O
O
OKNOZA2015-02-27 10:59:31
Nginx
OKNOZA, 2015-02-27 10:59:31

Nginx how to fix 304 error?

The problem is that content, pictures, videos, styles, etc. are not loaded from the subdomain to the main site. and logs displays a 304 error.
I connect this address:

<script src="http://cdn._адрес сайт_.info/templates/js/jquery.min.js"></script>

Nothing happens, but if you follow the link, Jquery will load normally.
nginx config.
#user nobody;
worker_processes 6;

events {
    worker_connections 1024;
}
    rtmp_auto_push on;

http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    keepalive_timeout 65;

    server {
            listen 80;
            server_name localhost;
             
              access_log /var/log/nginx/access.log;
              error_log /var/log/nginx/error.log;

            location / {
                 root /var/www;
                 index index.html index.htm;

            }


            # rtmp control
            location /control {
                 rtmp_control all;
            }

            location  /hls/ {
                       types {
                          application/vnd.apple.mpegurl m3u8;
                          video/mp2t ts;
                       }
            root /var/www;
            }

            error_page 500 502 503 504 /50x.html;
            location =/50x.html
                       {
                         root html;
            }
      }
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Cable7, 2015-02-27
@Kable7

304 is not an error, it means that the URI has not changed. It's most likely a file permissions issue.

V
Vladimir Shiklgruber, 2015-03-08
@mnjghgmjyt

chmod -R 0777 directory path
if it doesn't help pm go with your ssh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question