嗨,我现在处于非常混乱的状态。 我已经在Centos 6上configuration了Nginx 1.6,它只为代码(js,css,html)提供所有其他的图片,并通过负载平衡器调用。
我的问题是,当我加载网页浏览器第一次需要时间,然后我刷新页面3至4倍的图像/文字正在打破,如akki显示为__akki__我怎么知道它的caching和如何做我解决了这个问题我的configuration如下所示
user nginx; worker_processes 12; error_log /var/log/nginx/error.log warn; 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; proxy_buffers 30 32k; proxy_busy_buffers_size 64k; keepalive_timeout 65; 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; open_file_cache max=10000 inactive=30s; open_file_cache_valid 60s; open_file_cache_min_uses 2; open_file_cache_errors on; include /etc/nginx/conf.d/*.conf; }
和我的default.conf如下
server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }
请纠正我哪里错了