CSS 404 Error

HI,

Ngix giving ‘404 Not Found’ error when I am trying to access the below
url:
http://mysite.com/skin/frontend/tester/default/css/styles-ie.css
but at the same time I can access php file from the same locaiton:
http://mysite.com/skin/frontend/tester/default/css/test.php

Please help.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,230099,230099#msg-230099

Well you didn’t give us anything to work one. First of does that file
exist
in the same directoy where test.php is. Can you provide your ngnix.conf,
maybe you have some redirects for eather php files, or for css files.
Are
permissions ok? Maybe Nginx cannot read that file?

It could be many things, but you need to give us more information, if
you
would like to get some help.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,230099,230101#msg-230101

kustodian,

Thank You for your fast reply, i have resolved this by editing one of my
‘location’ in my nginx.conf file:

location / {
root /var/www/html;
index index.php index.html index.htm;
fastcgi_param REDIRECT_STATUS 200;
}

Previously this was ‘/usr/share/nginx/html’, but it was ‘var/www/html’
in
all other 'location’s.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,230099,230103#msg-230103

I recently encountered an issue with a 1.5.7 branch on OSX. i did not
check 1.5.8

The following code will set ALL css/js files as the default_type

include       /usr/local/nginx/conf/mime.types;
default_type  application/octet-stream;

The following code works as intended

default_type  application/octet-stream;
include       /usr/local/nginx/conf/mime.types;

I haven’t had time to test on other versions.

This could be the intended behavior, but the docs don’t suggest that.
usually a default_type only applies when the real type can’t be found.

Hello!

On Sat, Jan 04, 2014 at 03:36:33PM -0500, Jonathan V. wrote:

default_type  application/octet-stream;
include       /usr/local/nginx/conf/mime.types;

I haven’t had time to test on other versions.

This could be the intended behavior, but the docs don’t suggest
that. usually a default_type only applies when the real type
can’t be found.

Most likely there is a directive with some non-strict syntax (like
“index”) before they configuration you’ve quoted, and there is no
semicolon after it. E.g., something like this:

index         index.html
include       /usr/local/nginx/conf/mime.types;
default_type  application/octet-stream;

While the configuration looks like correct one with mime.types
included, it’s instead defines 3 index files (“index.html”,
“include”, “/usr/local/nginx/conf/mime.types”), and default_type -
but mime.types isn’t included.


Maxim D.
http://nginx.org/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs