Jump to content

[SOLVED] display correctly css files in apache2


htamayo

Recommended Posts

Hi, I coded a website with html+php+mysql+apache2, everything works fine except that the css doesn't display, particulary the images and some other css classes, so, I tried to modify my apache2.conf adding this line:

 

AddType text/css .css

 

But still doesn't work

 

Also, googling, I found that I can put this line in a .htaccess but still doesn't work.

 

My question is: how can I enable apache2 to display correctly my css file?

 

Regards

Link to comment
Share on other sites

It's weird, because if I type in my browser:

/var/www/app/viewitem.html 

 

I can view all css rules.

 

But, If I type:

http://localhost/viewitem.html

 

Almost all css rules disappear, that's because i think that the problem is Apache.

 

The browser I'm using is Firefox.

 

So, I think apache is involved in how the css is displayed

 

Link to comment
Share on other sites

You're not gonna believe the answer... it was about file permission.

 

The "not showed files" had "rwx----" file permission, I changed to 0644 file permission and ...everything works.

 

Wow, that really makes me like an idiot  :( , i checked the php code, css, apache conf and was a file permission issue, but, you know, I have a lot of to learn about LAMPs, Linux is a great OS, in fact, as a coder, i never pay attention like that but it really a mistake.

 

Thanks for your help

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.