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>
注意!!!涉及到路径的地方请按照安装教程,修改为自己的路径。