图像在nginx服务器上托管的网页上破碎

时间:2014-12-23 10:21:28

标签: javascript json nginx webserver centos6

我在Centos 6.4上配置了NGINX服务器我的NGINX服务器工作正常但是当我更新根目录中的另一个构建时,第一次网页加载成功但是当我刷新页面然后我的图像和文本来自网络页面破碎了。在根目录中,我有多个构建。

/usr/share/nginx/html/build1

我的nginx配置是休闲

user              nginx;
worker_processes  2;

error_log  /var/log/nginx/error.log;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

   access_log  /var/log/nginx/access.log  main;


    sendfile       on;
    #tcp_nopush     on;

    keepalive_timeout  65;
    #keepalive_timeout  65;

    proxy_buffers 30 32k;
    proxy_busy_buffers_size 64k;

    # Load config files from the /etc/nginx/conf.d directory
    # The default server is in conf.d/default.conf
    include /etc/nginx/conf.d/*.conf;

   gzip  on;
   gzip_comp_level 6;
   gzip_vary on;
   gzip_min_length  1024;
   gzip_proxied any;
   gzip_types text/plain text/css application/json application/x-javascript te$
   gzip_buffers 16 8k;

}

default.conf file 

server {

    listen       8080 default_server;
    server_name  _;
    root   /usr/share/nginx/html;
   #  location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
    #   expires 365d;
   # }


    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        index  index.html index.htm;
    }

    error_page  404              /404.html;
    location = /404.html {
        root   /usr/share/nginx/html;
    }

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

请建议我出错的地方

0 个答案:

没有答案