Apache2.2和Apache2.4的配置区别

2019-07-31 19:37:36

apache2.2配置文件:
<VirtualHost *:80>

ServerName domain.tld ServerAlias www.domain.tld
 
DocumentRoot /var/www/project/web <Directory /var/www/project/web> # enable the .htaccess rewrites AllowOverride All Order allow,deny Allow from All </Directory> ErrorLog /var/log/apache2/project_error.log CustomLog /var/log/apache2/project_access.log combined </VirtualHost>
 
apache2.4和2.2稍有不同,如果您是2.4,将<Directory>节点修改为: 
<Directory /var/www/project/web> # enable the .htaccess rewrites AllowOverride All Require all granted </Directory>
 
注意!!!涉及到路径的地方请按照安装教程,修改为自己的路径。


首页
网站模板
套餐咨询
QQ客服
咨询 QQ
1853600199
QQ咨询