Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 05-27-2006, 10:00 PM   #1
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
Linked stylesheets not working in Apache... do I need to enable them?

I have just installed Apache2 on SuSE10. It's generally working fine (PHP and MySQL are both functioning), but stylesheets aren't working.

The server index page (index.html) is generated by a script (the files in the main folder change constantly, as I'm using it for practice) It is linked to its stylesheet (index.css) with:
<link rel="stylesheet" href="index.css" type="text/css" />
If I copy both files into my home folder, the page is displayed with style, but if I access it on localhost, the it's shown in plain text. The only styles that are working are those that are applied inline.

Is this just a matter of editing a config file? I just don't really know where to start and haven't found anything useful yet on the web.

Old 05-28-2006, 06:19 AM   #2
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
i would try to give it a full domain address like

sometimes the server does not resolve relative urls.
cheers j
Old 05-28-2006, 07:25 AM   #3
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Original Poster
Rep: Reputation: 97
Thanks for the reply.

Your solution may have worked if that had been the problem. Discovered it was much simpler than that. My umask is set to 077 (single user PC, so not much need for files even to be group-readable). I'd discovered that I needed to change permissions on the html / php files I was writing, but hadn't thought to do this for the stylesheet.


"'Absurdly simple, like most riddles when you see the answer....' said Gandalf,... 'Too simple for a learned loremaster in these suspicious days...'"


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
Enable GD on Apache 2? logrunner Fedora 2 02-09-2006 12:31 PM
apache 2.x enable APR or not ? adrianmak Linux - Software 0 08-18-2005 07:49 AM
enable mod_rewrite in apache 1.3.9 robertngo Linux - Software 4 07-18-2005 04:02 AM
Docbook XSL Stylesheets /etc/xml/catalog Ironica Linux - Software 0 12-10-2004 04:03 AM
Winxp linked to Linux Linked to home network OverboardKiller Linux - Networking 2 06-09-2003 10:59 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:03 PM.

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