Combined with Apache and Php5apache versions
httpd-2.4.29
Version of PHP
php-5.6.30
The configuration file directory for Ps:apache is:/usr/local/apache2.4/conf/httpd.conf
One: Modify the Apache configuration file
<Directory /> AllowOverride none Require all denied</Directory>修改为:<Directory /> AllowOverride none Require all granted</Directory>PS:允许所有请求,否则我们访问时回报403错误。找到下面这行:AddType application/x-gzip .gz .tgz在这行下面添加以一行:AddType application/x-httpd-php .php找到这一段:<IfModule dir_module> DirectoryIndex index.html</IfModule>修改为:<IfModule dir_module> DirectoryIndex index.html index.php</IfModule>保存并退出。
Second, the test lamp is successful
1, test httpd configuration file is correct
[Email protected]/]#/usr/local/apache2.4/bin/apachectl-t
Syntax OK
The correct display is "Syntax OK", otherwise continue checking to modify the httpd configuration file.
Start httpd:
[[email protected]/]#/usr/local/apache2/bin/apachectl start
[Email protected]/]# NETSTAT-LNP | grep httpd
TCP6 0 0::: $:::* LISTEN 5553/httpd
82. Configure Apache and PHP