NGINX não está servindo CSS e JS

1

O NGINX não exibe arquivos CSS ou JS no navegador

Link para a página (magento) link

O log de acesso mostra:

[01/Dec/2013:16:55:17 +0000] "GET /js/varien/form.js HTTP/1.1" 304 0 "http://836237.vps-10.com/" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36"

Registro de erros não mostra erros.

A seguir está o meu arquivo vhost:

server {
listen       80 default_server;
server_name  836237.vps-10.com;
root   /data/www/public_html/hotnstylish/public/;

#charset koi8-r;
access_log  /data/www/public_html/hotnstylish/log/access.log;
error_log /data/www/public_html/hotnstylish/log/error.log;

location / {
include /etc/nginx/mime.types;
    root   /data/www/public_html/hotnstylish/public/;
    index  index.html index.htm index.php;
    try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
    expires 30d; ## Assume all files are cachable

}

#error_page  404              /404.html;

# redirect server error pages to the static page /50x.html
#
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#    proxy_pass   http://127.0.0.1;
#}

## These locations would be hidden by .htaccess normally
location ^~ /app/                { deny all; }
location ^~ /includes/           { deny all; }
location ^~ /lib/                { deny all; }
location ^~ /media/downloadable/ { deny all; }
location ^~ /pkginfo/            { deny all; }
location ^~ /report/config.xml   { deny all; }
location ^~ /var/                { deny all; }


# media
location ~* \.(png|gif|jpg|jpeg|css|js|swf|ico)$ {
    root   /data/www/public_html/hotnstylish/public/;
    access_log off;
    expires 30d;
}



# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
  location ~ ^/(app|includes|lib|media/downloadable|pkginfo|report/config.xml|var)/ { internal; }
  location /var/export/ { internal; }
  location /. { return 404; }
  location @handler { rewrite / /index.php; }
  location ~* .php/ { rewrite ^(.*.php)/ $1 last; }
  location ~* .php$ {
if (!-e $request_filename) { rewrite / /index.php last; }
expires off;
root           /data/www/public_html/hotnstylish/public/;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
include fastcgi_params;

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
#    deny  all;
#}
}    
}    

Meus tipos Mime em / etc / nginx /:

types {
text/html                             html htm shtml;
text/css                              css;
text/xml                              xml;
image/gif                             gif;
image/jpeg                            jpeg jpg;
application/x-javascript              js;
application/atom+xml                  atom;
application/rss+xml                   rss;

Por favor, ajudem muito tempo para resolver este! Obrigado

    
por user179181 01.12.2013 / 18:35

1 resposta

3

Limpe o cache do seu navegador.

304 significa "Não modificado" e instrui o navegador a exibir sua cópia em cache.

    
por 01.12.2013 / 18:38