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

I have an apache web server on a debian machine. I'm using virtualmin to administer virtual hosts. I have two sites on this server right now, when I try to access one site without the www in the URL I get an access denied. The other site is fine. The site with the problem is a cakephp app and has the following .htaccess file in the public_html folder.

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]

Below is the directives for the problem domain.

SuexecUserGroup "#1001" "#1001"
DocumentRoot /home/mydomain/public_html
ErrorLog /var/log/virtualmin/mydomain.net_error_log
CustomLog /var/log/virtualmin/mydomain.net_access_log combined
ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/
ScriptAlias /awstats/ /home/mydomain/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/mydomain/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
allow from all
AllowOverride All
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php5
<Directory /home/mydomain/cgi-bin>
allow from all
RewriteEngine on
RewriteCond %{HTTP_HOST}
RewriteRule ^(.*) [R]
RewriteCond %{HTTP_HOST}
RewriteRule ^(.*) [R]
RemoveHandler .php
RemoveHandler .php5
IPCCommTimeout 31
AuthName " statistics"
AuthType Basic
AuthUserFile /home/mydomain/.awstats-htpasswd
require valid-user
share|improve this question
What are the apache error logs telling you about the problem? Have you checked directory permissions? What is the difference to your working configuration? – Christian Jan 13 '11 at 8:13
What happens if you go to (or other existing page)? Does it work? – lg. Jan 13 '11 at 11:28
cant find entry in error logs, and when i look for index.php it says not found. Also the config is identical to the working host. – madphp Jan 13 '11 at 15:06
The error log should be at /var/log/httpd/error_log under Virtualmin – Josh Jan 13 '11 at 16:02
not updating any logs. tried accessing last modified files. – madphp Jan 13 '11 at 21:40

What happens if you exchange ServerName with ServerAlias?


Then try to add another fake virtual domain.

share|improve this answer
first step doesnt make a difference. I was thinking of adding another virtual domain, but wondering if there was a less messy option. – madphp Jan 13 '11 at 21:41

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.