LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-01-2007, 01:53 PM   #1
belorion
Member
 
Registered: Aug 2003
Distribution: Slackware 10.0
Posts: 124

Rep: Reputation: 16
VHost tries to use apache docroot images, should not


I have a virtual host setup for documentation.domain.com. The it seems that the website html and js load fine. But the website refers to it's images in ../icons/image.gif (the html are in a /html dir).

I'm getting 404 Forbidden errors. Looking at the apache error log, it's trying to do lookups in /usr/share/apache2/icons, instead of docroot/icons/image.gif. I have no clue why it would do that. All references in this vhost to the docroot are pointing to the right place. docroot/html/foo.html loads fine, but docroot/icons/image.gif does not. All dir permissions are 755, and the files themselves are 644.

Any idea why this vhost is trying to do these lookups in the apache docroot instead of the vhost docroot?

I'm using Apache2 2.0.49, on a Suse 9.1 box.

EDIT

To further clarify, in my error log I see this:

client denied by server configuration: /usr/share/apache2/icons/image.gif

Even though the docroot for the vhost is

/home/vhosts/documentation.domain.com/

And I'm trying to load

/home/vhosts/documentation.domain.com/icons/image.gif

Last edited by belorion; 02-01-2007 at 02:42 PM. Reason: clarificatoin
 
Old 02-03-2007, 04:05 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,938

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
I guess that this happens because there is the default Alias directive
Code:
Alias /icons/ "/usr/share/apache2/icons/"
in you httpd.conf. You can comment it if you don't need it, or use it inside your default host's configuration.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.0.54 DocRoot strange behaviour with VirtualHost dimsh Linux - Newbie 2 12-24-2005 03:31 AM
Apache: Alias is working on ssl vhost but not on mass vhost jonavogt Linux - Software 0 06-07-2005 02:05 PM
vhost in apache jelgavchik Linux - Networking 3 02-07-2005 06:41 PM
Fresh Load FC3 Apache err - Docroot must be directory trekk Linux - Networking 18 11-30-2004 04:48 PM
apache 1.3 vhost z4Rilla Linux - Software 0 08-03-2003 06:44 AM


All times are GMT -5. The time now is 10:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration