LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 546|回复: 0

WINDOWS下简单快捷的WEB架设

[复制链接]
发表于 2003-7-11 22:03:48 | 显示全部楼层 |阅读模式
=========================================

配置Apache Server(安装在根目录)
1  寻找Port 默认为80
2  寻找ServerAdmin 这里输入你的E-Mail地址
3  寻找ServerName 这里定义你的域名
4  寻找DocumentRoot 这里指定主页放置目录,记住,末尾不要加"/"  
5  寻找DirectoryIndex 默认首页,可以设多个.例:
       <IfModule mod_dir.c>
            DirectoryIndex index.htm
            DirectoryIndex index.php
            DirectoryIndex index.cgi   
            DirectoryIndex index.html
       </IfModule>
6  重启Apache Server

=========================================

=========================================

增加对 Perl CGI 脚本的支持  

1  安装Perl for Win32 ,安装在C:\usr (所有提问全"是")
2  寻找ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/",将""中的路径指向CGI脚本目录.例:
       ScriptAlias /cgi-bin/ "d:/www/"
3  改上面最近的下面的内容:""中路径与上面的相同.
   更改Allow Override和Options的参数为All(区分大小,下同).例:
       <Directory "d:/www">
            AllowOverride all
            Options all
            Order allow,deny
            Allow from all
       </Directory>
4  寻找AddHandler cgi-script .cgi 删除前面的#,在后面加上 .pl

=========================================

=========================================

增加对 PHP 脚本的支持(适用于APACHE1.3.X)
1  解开放在c:\php
2  到c:\php下,把php4ts.dll拷到c:\winnt\system32
3  把php.ini-recommended拷一份,改名为php.ini,移到c:\winnt\
4  打开c:\winnt\php.ini
;register_globals = Off 改成
register_globals = On
就可以了,把php.ini保存关闭

5  打开httpd.conf
  在httpd.conf文件相应的位置加上这四个:
        ScriptAlias /php/ "c:/php/"
        LoadModule php4_module c:/php/sapi/php4apache.dll
        AddModule mod_php4.c
        AddType application/x-httpd-php .php
6  测试:内容为: <?
                 phpinfo();
                ?>

以下适用于APACHE2.0.X
There are two ways to set up PHP to work with Apache 2.0 on Windows. One is to use the CGI binary the other is to use the Apache module DLL. In either case you need to stop the Apache server, and edit your httpd.conf to configure Apache to work with PHP.

You need to insert these three lines to your Apache httpd.conf configuration file to set up the CGI binary: Example 3-8. PHP and Apache 2.0 as CGI

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"




If you would like to use PHP as a module in Apache 2.0, be sure to move php4ts.dll to winnt/system32 (for Windows NT/2000) or windows/system32 (for Windows XP), overwriting any older file. You need to insert these two lines to your Apache httpd.conf configuration file to set up the PHP-Module for Apache 2.0: Example 3-9. PHP and Apache 2.0 as Module

LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php




Note: Remember to substitute the c:/php/ for your actual path to PHP in the above examples. Take care to use php4apache2.dll in your LoadModule directive and notphp4apche.dll. The latter one is designd to run with Apache 1.3.x.



=========================================

=========================================

安装MYSQL,点击安装文件后,在DOS下运行下条命令
mysqld-max-nt --install (在bin目录下)
再在服务里启动Mysql
所有数据库文件都要放在DATA文件夹内!

=========================================
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表