嗨,我现在很困惑。我在 Centos 6 上配置了 Nginx 1.6,仅用于提供代码(js、css、html)页面,所有其他图像传入和调用都通过负载均衡器进行。
我的问题是,当我第一次在 Web 浏览器上加载页面时,需要花费一些时间,然后我刷新页面 3 到 4 次,图像/文字就会中断,如图akki
所示,__akki__
我如何知道它的缓存位置以及如何解决这个问题,我的配置如下所示
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;
}
}
请纠正我哪里错了