Open twn39 opened 7 years ago
下载apache最新版:http://www.apachelounge.com/download/
编辑http.conf
:
加载php模块
PHPIniDir "D:/php7/"
LoadModule php7_module "D:/php7/php7apache2_4.dll"
修改索引文件
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>
添加php文件类型
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
注:启用
proxy_http_module
会出现问题
启用vhost
:
Include conf/extra/httpd-vhosts.conf
安装:
Install
-------
- Unzip the Apache24 folder to c:/Apache24 (that is the ServerRoot in the config).
Default folder for your your webpages is DocumentRoot "c:/Apache24/htdocs"
When you unzip to an other location, change ServerRoot in the httpd.conf,
and change in httpd.conf the Documenroot, Directories, ScriptAlias,
also when you use the extra folder config file(s) change to your location there.
Start apache in a DOS box:
>httpd.exe
Install as a service:
>httpd.exe -k install
ApacheMonitor:
Double click ApacheMonitor.exe, or put it in your Startup folder.
Windows配置Apache和PHP7