LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache2 ignores CSS files (http://www.linuxquestions.org/questions/linux-software-2/apache2-ignores-css-files-396829/)

rblampain 12-27-2005 07:51 AM

Apache2 ignores CSS files
 
I have "documentroot" set as /var/www/html with index.html in this directory. This index.html points to a css file in /var/www/html/u1/.

When I load index.html through the browser it displays correctly but when I access it through apache2 it does not render the css file.

Could anyone suggest how to fix this?

mjmwired 12-27-2005 12:40 PM

This sounds like a path problem not an Apache problem.

In your html file how are you accessing the css file?
Look in your Apache logs to see what the actual path of the CSS file it is requesting. If it cannot be found you will see a 404 error.

rblampain 12-28-2005 10:19 AM

Yes the log shows a path error. I should have been more careful. Thank you for your help

rblampain 12-28-2005 10:50 AM

I'm getting confused now, the error just mentioned had been corrected. I am testing different systems with different apache2 configurations. I had to write the correct config file to /etc/apache2/ and I am getting something else I can't work out:
lt:/home/rene# /etc/init.d/apache2 restart
Forcing reload of web server: Apache2[Thu Dec 29 23:47:45 2005] [warn] NameVirtualHost *:0 has no VirtualHosts
[Thu Dec 29 23:47:46 2005] [warn] NameVirtualHost *:0 has no VirtualHosts
.
lt:/home/rene#

I'll obviously have to fix this before I can check the previous problem, if nobody can help, I'll make a new post.


All times are GMT -5. The time now is 06:08 AM.