在Windows下安装Apache + PHP3_PHP
Apache
本文只讨论如何在Windows NT 4.0或Windows 2000下安装Apache+PHP3。我使用的Apache为apache_1_3_12_win32.exe。
注意您得先安装PHP3哦,可以照我写的文档进行安装:在Windows下安装PHP3,注意不需要做这一步:二、软件安装->3->f)。
一、软件下载
您可以从下列站点下载Windows版本的Apache Web Server软件:
http://www.apache.org/dist/binaries/win32/
二、安装Apache
1、双击下载的Apache可执行文件(如apache_1_3_12_win32.exe)进行安装,安装
的时候您可以选择安装的目的地,缺省为C:\Program Files\Apache Group\Apache,
我用$APACHE_ROOT来代替安装目的地;
2、修改$APACHE_ROOT\conf\httpd.conf:
Port 80
设置Apache Web Server运行时使用的端口号,由于我这里的IIS也在运
行,IIS使用了80端口号,于是我把它改成Port 8080,这时我在浏览器上
输入http://localhost:8080/才能访问到Apache Web Server服务器,
输入http://localhost/时能访问到IIS,这样两个Web Server都可以用
了哦,我用$PORT标识
ServerAdmin you@your.address
设置管理员信箱,当服务器出问题时,它就会把出现的问题发到管理员信箱
中,我这里把它改成了ServerAdmin hhzqq@chinaweal.com
DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"
设置文档根目录,当您在浏览器上输入http://localhost:$PORT/时,服
务器会从文档根目录读取数据,我把它改成了
DocumentRoot "D:\HZQ\PHP3",我用$DocumentRoot标识
把这个改成
DirectoryIndex index.html
设置默认文档,为了支持php3,我把它改成了DirectoryIndex
index.html index.htm index.php3 index.php index.phtml
3、为了使用PHP,还应该在$APACHE_ROOT\conf\httpd.conf文件未尾加上类似的一
段话:
ScriptAlias /php3/ "c:/php3/"
AddType application/x-httpd-php3 .php3 .php .phtml
Action application/x-httpd-php3 "/php3/php.exe"
注意c:/php3/应该改为您那里的PHP目录,而且要用/而不是\
4、Apache安装完后在Start菜单组中有快捷方式,运行Install Apache as a service,
这样的话在NT的服务中就多了一个名为Apache的服务,用它可以启动或停止Apache服务。
5、启动Apache服务,完装完毕,祝您好运。
附:
Apache下载网址
http://www.apache.org/dist/binaries/win32/

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics





To set up a CGI directory in Apache, you need to perform the following steps: Create a CGI directory such as "cgi-bin", and grant Apache write permissions. Add the "ScriptAlias" directive block in the Apache configuration file to map the CGI directory to the "/cgi-bin" URL. Restart Apache.

The steps to start Apache are as follows: Install Apache (command: sudo apt-get install apache2 or download it from the official website) Start Apache (Linux: sudo systemctl start apache2; Windows: Right-click the "Apache2.4" service and select "Start") Check whether it has been started (Linux: sudo systemctl status apache2; Windows: Check the status of the "Apache2.4" service in the service manager) Enable boot automatically (optional, Linux: sudo systemctl

Apache connects to a database requires the following steps: Install the database driver. Configure the web.xml file to create a connection pool. Create a JDBC data source and specify the connection settings. Use the JDBC API to access the database from Java code, including getting connections, creating statements, binding parameters, executing queries or updates, and processing results.

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

To delete an extra ServerName directive from Apache, you can take the following steps: Identify and delete the extra ServerName directive. Restart Apache to make the changes take effect. Check the configuration file to verify changes. Test the server to make sure the problem is resolved.

There are 3 ways to view the version on the Apache server: via the command line (apachectl -v or apache2ctl -v), check the server status page (http://<server IP or domain name>/server-status), or view the Apache configuration file (ServerVersion: Apache/<version number>).

This article discusses how to improve Hadoop data processing efficiency on Debian systems. Optimization strategies cover hardware upgrades, operating system parameter adjustments, Hadoop configuration modifications, and the use of efficient algorithms and tools. 1. Hardware resource strengthening ensures that all nodes have consistent hardware configurations, especially paying attention to CPU, memory and network equipment performance. Choosing high-performance hardware components is essential to improve overall processing speed. 2. Operating system tunes file descriptors and network connections: Modify the /etc/security/limits.conf file to increase the upper limit of file descriptors and network connections allowed to be opened at the same time by the system. JVM parameter adjustment: Adjust in hadoop-env.sh file

Apache cannot start because the following reasons may be: Configuration file syntax error. Conflict with other application ports. Permissions issue. Out of memory. Process deadlock. Daemon failure. SELinux permissions issues. Firewall problem. Software conflict.
