DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is the weirdest thing. I have a couple Virtual Hosts running on my machine. When I access their directories by http://myipaddress/directory/ they display just fine.
But when I try and connect with the virtual host, the HTML renders fine, but no images are displayed! http://myvirtualhost.com
No images? WTF?
Directory structure of the vhost is like this:
index.html
images/
All the pictures are stored in "images/". It's like it refuses to look any farther up into the directory structure than the first directory of the vhost.
What do your image links look like? Are they "images/imagename.xxx", "/images/imagename.xxx" or "directory/images/imagename.xxx" ? The first 2 will work but the last one will not (obviously). Example: If you right click on where the image should be and click "View Image", where are you taken?
I can't think of anything off the top of my head that you could do with either server config or permissions which would do this (well, not accidentally anyway).
Are you mixing case? *NIX filesystems are case sensitive
You can post your httpd.conf if you like, but if you do, please post the output of grep -v '^#' httpd.conf which will remove all the comment lines.
Also, check the error log for the vhost(s) in question. Apache will log the file path that it tried to serve as well as the error code you're getting (404 is not found, 403 is forbidden, etc). Unless you have a pretty compelling reason not to, a URL to see the behavior would be helpful too (though if it's an internal or work related thing I completely understand not divulging that info).
oak:/etc/apache/logs# tail -f mydomainname.com-error_log
[Tue Feb 8 15:57:21 2005] [error] [client x] File does not exist: /usr/share/images/ltologo178.jpg
[Tue Feb 8 15:57:21 2005] [error] [client x] File does not exist: /usr/share/images/anadelay.gif
[Tue Feb 8 15:57:21 2005] [error] [client x] File does not exist: /usr/share/images/ltoblur.gif
[Tue Feb 8 15:57:29 2005] [error] [client x] File does not exist: /usr/share/images/ltologo178.jpg
Why is it referencing a link like...
<img src="images/booya.gif">
...off /usr/share/ instead of off the directory that is making the reference???
I'd rather not provide the real URLs for security reasons, you understand. I think we're definitely getting close now. Shouldn't be necessary.
What's the DocumentRoot set to for the vhosts? It should be /path/to/your/docroot , but it looks like it's either set to /usr/local or not at all and being overriden from somewhere else. Do you have any RewriteRule or Alias(Match) directives in your httpd.conf?
Posting your conf might be in order if you can't figure it out.
Security reasons? This is a public site that you're making, right? If it's not secure, I'd not put it up
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.