Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is the setup I have working for

<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  ServerAlias *
  DocumentRoot /var/www/

If I request, apache throws a 403 with the following appended to the log:

(13)Permission denied: /root/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

I've tried changing ServerName to, and changing ServerAlias to as well with no luck.

What am I missing?

share|improve this question

Have you tried actually checking whether the .htaccess file is readable (or why Apache wants to read it)? ServerName should be, ServerAlias

share|improve this answer

You ou can not put an star (*) in ServerAlias. You should put the name you want. In your case, ServerAlias should be written.

Edit : I found something for your problem. I think there is another problem in your configuration, like an other virtual host, with an other root directory.

share|improve this answer
Yes, there was another problem. I am on Ubuntu; I have been editing /etc/apache2/sites-available/default and I had also edited /etc/apache2/httpd.conf earlier adding another VirtualHost stanza. Which is more correct to use out of the two files if I'm looking to set up several virtual hosts matching different subdomains? – sendos Apr 2 '10 at 23:47
Create a file in /etc/apache2/sites-available for each virtualhost you have. Don't forget to activate it with a2ensite file Then each virtualhost is easy to find and to manage. Check – Dom Apr 4 '10 at 16:09

Sounds like you are trying to do wildcard DNS, in this case you CAN use an asterix.

Here's a good link I found:

Also, siding with Emthigious, check your .htaccess file permissions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.