1. Preliminary preparations: Apache2 (Win32) fully modular installation of perl, php, ssl
1. An installed WIN2000 server. Note: If IIS has been installed on your machine, stop all web sites in IIS or change the port to something else.
2. Download software
APACHE 2.0.48
Perl 4.3.1
PHP 4.3.1
MYSQL 4.0.12
ZendOptimizer
There are also a few small things, which are very important and will be used in subsequent installations (not all of them will be used, some files are compiled and can be used directly)
Download address 1:
Download address 1:
Inside the package are: mod_perl 1.9/ mod_ssl 2.0.43/ OpenSSL 0.9.6h/ mod_jk/ ApacheModuleGzip.dll
gd 2.0.9/ gdpm/ perldiver 1.1/ Chinese php.ini/editplus /php_gd_gif.dll, etc.
2. Installation starts
1. APACHE installation
1.1: Run apache_2.0.44-win32-x86-no_ssl.msi,
Assume that the default path of my installation is X:, so that it is installed under the path of APACHE2 under the x disk, and the default domain is domain.com.
1.2: (To create a virtual host, you don’t need to do this step)
Edit X:apache2confhttpd.conf
Found #NameVirtualHost*
Change it to NameVirtualHost 192.168.0.1 #Note that this IP is the IP set for your own host
Find ServerName domain.com and change it to #ServerName domain.com
Find ServerAdmin * (* is the email address you filled in when installing apache) and change it to #ServerAdmin
Next, add the following statement: #... is my comment, you don’t need to add it, just take a look at it.
<VirtualHost 192.168.0.1>
ServerAdmin
[email protected] #The email address of the host administrator (contact person)
ServerName domain.com
#Host name (host header name)
ServerAlias domain.com www1.domain.com
#Host name (the host header name can also be effective)
document.oot X:/VirtualHost/domain.com/www.domain/wwwroot
#The www root directory of the virtual host.
ErrorLog X:/VirtualHost/domain.com/www.domain/logs/www.domain-error_log
#Error log document, which can also be ../logs/www.domain-error_log
CustomLog X:/VirtualHost/domain.com/www.domain/logs/www.domain-access_log common
ScriptAlias /cgi-bin /cgi-bin
#Specify the perl script running directory. Of course, if not specified, the entire directory can be run.
ScriptAlias /php4/ "/php-bin"
#Specify the php script running directory. Of course, if not specified, the entire directory can be run.
Errordocument.nbsp400/400.html
#Customize the error file. It should be noted that the error file must be placed in the root directory.
#Or create another virtual host, such as errors.domain.com, and place the error file in its root directory.
#Then the error document should be "Errordocument.nbsp400 http://errors.domain.com/400.html"
</VirtualHost>
***If you choose to set up a virtual host, please set the browser settings INTERNET options-Connection-LAN settings.
Select "Use proxy server", address: 192.168.0.16 (write the IP of your host, local debugging 127.0.0.1) Port: 80.
If you are the only one in the LAN that is starting up, you should add 127.0.0.1, just like local debugging.
1.3: Change the file name X:apache2htdocsindex.html.en to c:apachehtdocsindex.html
1.4: Visit http://localhost or http://domain.com. If you can see the page, it’s OK!
2. Install MYSQL
2.1: Unzip mysql-4.0.12-win.zip to directory X:MYSQL
2.2: Enter D:MYSQL, run SETUP.EXE and press Enter. It will be installed to X:MYSQL by default.
3. Install PHP
3.1: Unzip php-4.3.1-Win32.zip to directory X:PHP
3.2: Enter X:PHP and start configuring PHP
3.3: Change the file name php.ini-dist to php.ini
(Or use the PHP.INI file in the serv.rar package above, which can be used directly without modification)
3.4: Open php.ini, find extension=php_gd.dll, remove the preceding semicolon, find extension=php_gd2.dll, remove the preceding semicolon, and add extension=php_gd_gif.dll in the same position, which is the file I provided above. There is it in serv.rar.
3.5: Copy php.ini and php4ts.dll to the system32 and system directories in the WIN2000 system installation directory.
3.6: Open the APACHE configuration file httpd.conf file and add the following statement (the location is arbitrary):
LoadModule php4_module X:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php4
ScriptAlias /php4/ "C:/php/"
Action application/x-httpd-php4 "/php4/php.exe"
Add extension parsed by PHP:
AddType application/x-httpd-php4 .php .php3 .php4 .php2
#mod_perl
LoadFile "c:/usr/bin/perl58.dll"
LoadModule perl_module modules/mod_perl.so
#mod_ssl
LoadModule ssl_module modules/mod_ssl.so
LoadModule gzip_module modules/ApacheModuleGzip.dll
Note: ApacheModuleGzip.dll (ie: mod_gzip) is included in the package. It can compress static web pages.
<<Remember to put mod_ssl.so, mod_perl.so and ApacheModuleGzip.dll in serv.rar into the X:apache2modules directory>>
4. Install ZendOptimizer
4.1: Install ZendOptimizer-2[1].1.0a-Windows-i386.exe to directory X:zend
The rest of the steps are up to you to choose.
5. Install PERL
5.1: Install ActivePerl-5.8.0.804-MSWin32-x86.msi to the directory C:usr. Note that your windows Installer service should be patched with the windows service pack.
6.Other settings
6.1: Find DirectoryIndex and add the following statement:
DirectoryIndex index.html index.html.var index.htm index.php index.shtml
DirectoryIndex index.php3 index.php4 index.cgi index.pl index.html
If you still want to add SSI, you need to remove the # sign in front of the following two lines.
AddType text/html .shtml
AddHandler server-parsed .shtml
6.2: Find all "Options FollowSymLinks" and change them all to "Options ALL". Pay attention to the case. No need to add the "" sign.
Find all "AllowOverride None" and change them all to "AllowOverride ALL". Pay attention to the case. No need to add the "" sign.
6.3: Find #ScriptAlias /cgi-bin/ "X:/Apache2/cgi-bin/" and remove the # sign in front of it
6.4: Find AddHandler cgi-script .cgi and add .pl after it, that is, AddHandler cgi-script .cgi .pl
6.5: Restart Apache HTTP Server
7: Test
7.1: Write the test file env.php (copy to the directory where php can be executed)
File content: (actually just one line)
<?phpinfo(); ?>
Visit: http://localhost/info.php or http://domain.com/info.php
If you see the PHP welcome test page, it means the installation is successful!
Write the test file env.cgi (copy to the directory where cgi can be executed)
File content:
#!/usr/bin/perl
print "Content-type:text/html ";
print "KO";
exit;
Visit: http://localhost/cgi-bin/env.cgi or http://cgi-bin/env.cgi
If you see the cgi test page, it means the installation is successful!
So far, your system has been configured! Take a look at the serv.rar I provided to see if there is anything left that is useless?
If so, put it in the appropriate location
You have configured win2000+apache+php+mysql+mod_perl+perl+mod_ssl+ZendOptimizer
Furthermore, mod_ssl and openssl have been compiled in the serv.rar package and can be used directly. If you really want to use these two things, you should know something about ca.