Forum: NGINX CSS 404 Error

2974d09ac2541e892966b762aad84943?d=identicon&s=25 iqbalmp (Guest)
on 2012-08-27 13:59
(Received via mailing list)
HI,

Ngix giving '404 Not Found' error when I am trying to access the below
url:
http://mysite.com/skin/frontend/tester/default/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
2974d09ac2541e892966b762aad84943?d=identicon&s=25 kustodian (Guest)
on 2012-08-27 14:00
(Received via mailing list)
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
2974d09ac2541e892966b762aad84943?d=identicon&s=25 iqbalmp (Guest)
on 2012-08-27 14:00
(Received via mailing list)
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
3fc448a0368821b51a9f7e2781a8b7a6?d=identicon&s=25 Jonathan Vanasco (Guest)
on 2014-01-04 21:37
(Received via mailing list)
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.
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-01-09 14:18
(Received via mailing list)
Hello!

On Sat, Jan 04, 2014 at 03:36:33PM -0500, Jonathan Vanasco 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 Dounin
http://nginx.org/
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.