apache2.4和 2.2版本的配置有区别
2.4的配置如下
<VirtualHost *:80>
DocumentRoot /www/web/project
ServerName www.domain.com
ServerAlias domain.com
directoryindex index.html index.php
defaulttype text/html
addtype application/x-httpd-php .html
adddefaultcharset utf-8
<Directory /www/web/project/>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
2.2的配置如下
<VirtualHost *:80>
DocumentRoot /www/web/project
ServerName www.domain.com
<Directory "/www/web/project">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
时间: 2024-11-09 07:07:57