.htaccess中的DocumentRoot导致错误

4 apache configuration

我的.htaccess文件中有DocumentRoot/var/www/test.这导致apache服务器给我500内部服务器错误.

错误日志文件显示:alert] [client 127.0.0.1] /var/www/.htaccess:DocumentRoot不允许在这里

AllowOveride All在我的conf文件中设置.

知道为什么会这样吗?

Gre*_*ill 11

DocumentRoot的指令不能出现在一个.htaccess文件中.把它httpd.conf放进去.

  • 或指定的VirtualHost文件 (2认同)