Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Just realised i posted this on stack overflow by mistake, so here it is in the correct place!

I have approx 50 sites that all use the exact same files other than CSS and IMAGES, i currently duplicate the files each time i create a new site and upload different css and images.

What I want do so set up each vhost to have the same DocumentRoot then add AliasMatch for the css and images folders e.g:

#Common Files VHOST
    DocumentRoot /home/commonfiles/public_html

#Sample vhost for 1 of the 50 sites.
    DocumentRoot /home/commonfiles/public_html
    AliasMatch /css/(.*) /home/ftpuser/public_html/mycss/$1

The alias works perfectly for the bespoke files but the common files cant be accessed because of permission errors:

[Mon Nov 16 09:31:01 2009] [crit] [client] (13)Permission denied: /home/commonfiles/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

This is the current server setup which I think may be part of the problem (Previous Server Admin Set this up):

  • Apache(Apache/2.2.14 (Unix)
  • PHP 5.2.11
  • CentOS 4.8 i686 standard
  • PHP 5 Handler is dso
  • Apache suEXEC is on

Any suggestions?

share|improve this question
Show us the full, real config files; you've got a permissions problem but haven't showed us any of the permissions-related config. – womble Nov 16 '09 at 11:25
I'm afraid, I'm not quite sure what to show, where can i obtain this info? – icelizard Nov 16 '09 at 11:33
Example: /home/commonfiles/public_html/.htaccess has 644 commonfiles:commonfiles – icelizard Nov 16 '09 at 11:34
up vote 1 down vote accepted

It appears that by default the the public_html folder has permissions of 750, I changed to 755 and updated the open_basedir restrictions and all started to work great.

I just have to make sure that I can still have a .htaccess per site.

share|improve this answer

You've got an issue with a htaccess file somewhere.

If all your configuration is inside /etc/apache2 you don't even need htaccess file support enabled and can get a small speedup by disabling it.

You could also use something like mod_vhost_alias to simplify your configuration.

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.