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

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

 

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.