<p>I have  DocumentRoot /var/www/test    in my .htaccess file. This is causing the apache server to give me a 500 internal server error.</p>

<p>The error log file shows:
alert] [client 127.0.0.1] /var/www/.htaccess: DocumentRoot not allowed here</p>

<p>AllowOveride All is set in my conf file.</p>

<p>Any idea why this is happening?</p>

The
DocumentRoot
directive cannot appear in a
```
.htaccess
```
file. Put it in
```
httpd.conf
```
instead.