VirtualHost Directory Not Found
VirtualHost Directory Not Found
am 29.10.2009 16:57:05 von Robert Harrison
I have Apache 2.2.8 installed on a machine running openSuse.
I have set up mixed name-based and ip-based virtual hosting.
Listen.conf
Listen *:80
Listen *:443
default-server.conf
NameVirtualHost aaa.xxx.yyy.zzz:80
ServerName localhost
DocumentRoot and have been removed.
A name-based virtual host config
(same ip as namevirtualhost directive)
ServerName www.digestive-medicine.com
ServerAlias digestive-medicine.com
DocumentRoot "/usr/local/tomcat/webapps5/ROOT"
ErrorLog "/var/log/apache2/digestive.com-error_log"
CustomLog "/var/log/apache2/digestive-access_log" combined
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
Options -Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
When I try to access this site (for example), the browser gets an
"Access Denied" 403 error and the error.log says " client denied by
server configuration: /srv/www/htdocs/". This is the compiled path
which I interpret to mean that the virtualhost directory is not being
seen or read and no path is given in default-server config.
Permissions are okay because, as user "nobody" I can move the the
directory specified in virtualhost or the one ending in htdocs and
read files there.
I would appreciate any suggestions.
Bob
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: VirtualHost Directory Not Found
am 30.10.2009 02:22:41 von Igor Cicimov
Couple of questions
"DocumentRoot and have been removed."
Why did you do that?
"
Options -Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
"
I think you need Alias directive here in front of the to
bring that directory into apache document root.
"AllowOverride All"
Do you have .htaccess file in that directory?
Cheers,
Igor
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: VirtualHost Directory Not Found
am 30.10.2009 02:44:53 von Robert Harrison
Igor,
Thanks very much for your questions.
I removed the DocumentRoot and Directory stanzas from
default-serverl.conf just to simplify things where I could.
The path in the Directory stanza is the same as DocumentRoot. It was
my understanding that an Alias would only be needed if the files were
in a different location.
Again, thanks for the questions.
Bob
"When you find a big kettle of crazy, its best not to stir it." - Dilbert
On Thu, Oct 29, 2009 at 9:22 PM, Igor Cicimov wrote:
> Couple of questions
>
> "DocumentRoot and have been removed."
>
> Why did you do that?
>
> "
> =A0
> =A0 =A0 =A0 Options -Indexes +FollowSymLinks
> =A0 =A0 =A0 AllowOverride All
> =A0 =A0 =A0 Order allow,deny
> =A0 =A0 =A0 Allow from all
> =A0
> "
>
> I think you need Alias directive here in front of the to
> bring that directory into apache document root.
>
> "AllowOverride All"
>
> Do you have .htaccess file in that directory?
>
> Cheers,
>
> Igor
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> =A0 " =A0 from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: VirtualHost Directory Not Found
am 30.10.2009 08:30:53 von aw
Igor Cicimov wrote:
> "
>
Which is usually a Bad Idea.
Tomcat knows that it should not serve, e.g., the contents of a WEB-INF
directory.
Apache httpd does not know that.
So unless you proxy *everything* to Tomcat (which would then raise the
question of why you have Apache), Apache will happily serve your
WEB-INF/web.xml for instance (and anything else in there you thought was
private).
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: VirtualHost Directory Not Found
am 04.11.2009 19:38:35 von Robert Harrison
Okay.
I copied a fresh default-server.conf into /etc/apache2. It has the
DocumentRoot and stanzas. I added NameVirtualHost
aaa.xxx.yyy.zzz:80 to it.
Here is a fresh copy of the VirtualHost configuration. I turned
CanonicalNames on and removed the Options and AllowOverride lines from
the statments. Here's what the revised VirualHost config
looks like.
ServerAdmin rharri@domain.com
ServerName www.domain.com
ServerAlias domain.com
DocumentRoot "/usr/local/tomcat/webapps5/ROOT"
ErrorLog "/var/log/apache2/-error_log"
CustomLog "/var/log/apache2/access_log" combined
HostnameLookups Off
UseCanonicalName On
ServerSignature On
Order allow,deny
Allow from all
The sites using Tomcat are on different IPs (not NamedVirtualHost)
and have the following added to their configuration:
AllowOverride None
Order deny,allow
deny from all
apachectl -S is without error and recognizes the NamedVirtualHosts
(what does the ":2" at the end of "conf" indicate?).
:
Yet, when any of the sites are accessed, the DocumentRoot used is
"/srv/www/htdocs" (from default-server.conf).
Any suggestions? Is this an Apache problem?
Bob
On Fri, Oct 30, 2009 at 3:30 AM, Andr=E9 Warnier wrote:
> Igor Cicimov wrote:
>>
>> "
>> =A0
>
> Which is usually a Bad Idea.
> Tomcat knows that it should not serve, e.g., the contents of a WEB-INF
> directory.
> Apache httpd does not know that.
> So unless you proxy *everything* to Tomcat (which would then raise the
> question of why you have Apache), Apache will happily serve your
> WEB-INF/web.xml for instance (and anything else in there you thought was
> private).
>
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> =A0" =A0 from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org