php -- 配置与安装

1.php与apache安装路径

php -- 配置与安装

2.安装Apache服务 httpd -k install

开启关闭重启服务 http -k start/stop/restart

3.php.ini-development重命名为 php.ini

4.配置Apache的httpd.conf,关联php解析器。在最后添加

LoadModule php5_module "F:\APP\IDE\PHP\php5\php5apache2_4.dll"
PHPIniDir "F:\APP\IDE\PHP\php5"

在<IfModule mime_module>里面添加

AddType application/x-httpd-php .php

5.更改服务器默认目录

 #DocumentRoot "F:\APP\IDE\PHP\Apache24/htdocs"
 DocumentRoot "D:\a\php\root"
 Alias /ap "F:\APP\IDE\PHP\Apache24/htdocs"
 Alias /test "D:\a\php\test"
 Alias /temp "D:\a\php\temp"

 <Directory "D:\a\php\root">
     Require all granted
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
     Satisfy all
 </Directory>
 <Directory "D:\a\php\test">
     Require all granted
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
     Satisfy all
 </Directory>
 <Directory "D:\a\php\temp">
     Require all granted
     Options Indexes FollowSymLinks
     AllowOverride None
     Order allow,deny
     Allow from all
     Satisfy all
 </Directory>
 <Directory "F:\APP\IDE\PHP\Apache24/htdocs">
     #
     # Possible values for the Options directive are "None", "All",
     # or any combination of:
     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
     #
     # Note that "MultiViews" must be named *explicitly* --- "Options All"
     # doesn't give it to you.
     #
     # The Options directive is both complicated and important.  Please see
     # http://httpd.apache.org/docs/2.4/mod/core.html#options
     # for more information.
     #
     Options Indexes FollowSymLinks

     #
     # AllowOverride controls what directives may be placed in .htaccess files.
     # It can be "All", "None", or any combination of the keywords:
     #   AllowOverride FileInfo AuthConfig Limit
     #
     AllowOverride None

     #
     # Controls who can get stuff from this server.
     #
     Require all granted
 </Directory>
上一篇:Centos6.5DRBD加载失败,系统更换yum源(国内163)


下一篇:[SDOI2014]数表