LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-27-2005, 06:51 AM   #1
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 833

Rep: Reputation: 35
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?
 
Old 12-27-2005, 11:40 AM   #2
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
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.
 
Old 12-28-2005, 09:19 AM   #3
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 833

Original Poster
Rep: Reputation: 35
Yes the log shows a path error. I should have been more careful. Thank you for your help
 
Old 12-28-2005, 09:50 AM   #4
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 833

Original Poster
Rep: Reputation: 35
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.
 
  


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
apache2 missing config files c-- Ubuntu 5 06-20-2005 08:24 PM
Where are the Apache2 Files... darkarcon2015 Slackware 4 01-30-2005 07:15 PM
apache2 + .pl files? heilpern Linux - Software 5 08-28-2004 12:26 PM
Upload Files in Apache2.... vous Linux - Software 0 02-03-2004 07:51 AM
Apache2 CGI-Perl will not read files fefeh Linux - Software 0 06-30-2003 08:07 PM


All times are GMT -5. The time now is 10:58 PM.

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