Home Backend Development PHP Tutorial 在Windows下安装Apache + PHP3_PHP

在Windows下安装Apache + PHP3_PHP

Jun 01, 2016 pm 12:35 PM
apache server Can Install

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/

 
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Is c++ front-end or back-end? Is c++ front-end or back-end? Apr 22, 2024 pm 05:33 PM

Is c++ front-end or back-end?

PHP Framework Performance Comparison: The Ultimate Showdown of Speed ​​vs. Efficiency PHP Framework Performance Comparison: The Ultimate Showdown of Speed ​​vs. Efficiency Apr 30, 2024 pm 12:27 PM

PHP Framework Performance Comparison: The Ultimate Showdown of Speed ​​vs. Efficiency

How to generate URL from html file How to generate URL from html file Apr 21, 2024 pm 12:57 PM

How to generate URL from html file

The evasive module protects your website from application layer DOS attacks The evasive module protects your website from application layer DOS attacks Apr 30, 2024 pm 05:34 PM

The evasive module protects your website from application layer DOS attacks

Integration and expansion of golang function concurrency control and third-party libraries Integration and expansion of golang function concurrency control and third-party libraries Apr 25, 2024 am 09:27 AM

Integration and expansion of golang function concurrency control and third-party libraries

How to conduct concurrency testing and debugging in Java concurrent programming? How to conduct concurrency testing and debugging in Java concurrent programming? May 09, 2024 am 09:33 AM

How to conduct concurrency testing and debugging in Java concurrent programming?

How to add a server in eclipse How to add a server in eclipse May 05, 2024 pm 07:27 PM

How to add a server in eclipse

Application of algorithms in the construction of 58 portrait platform Application of algorithms in the construction of 58 portrait platform May 09, 2024 am 09:01 AM

Application of algorithms in the construction of 58 portrait platform

See all articles