Server bandwidth 1m I casually wrote a page test in which I put ten pictures each with a size of more than 100 kb. Every time I opened the page, the first few pictures were loaded at a normal speed, and three or four images could not be loaded for a long time until finally, the nginx could not be loaded. The following is the configuration of nginx is my nginx configuration is not correct? Other configurations create a new test.conf
conf.d
directory untouched.
test.conf
server {
server_name ***.com;
root /var/www/html/test;
index 1.html;
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|js|pdf|txt){
root /var/www/html/test;
}
}
nginx.conf
http {
-sharp-sharp
-sharp Basic Settings
-sharp-sharp
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
-sharp server_tokens off;
-sharp server_names_hash_bucket_size 64;
-sharp server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
-sharp-sharp
-sharp SSL Settings
-sharp-sharp
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; -sharp Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
-sharp-sharp
-sharp Logging Settings
-sharp-sharp
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
-sharp-sharp
-sharp Gzip Settings
-sharp-sharp
gzip on;
gzip_disable "msie6";
-sharp gzip_vary on;
-sharp gzip_proxied any;
-sharp gzip_comp_level 6;
-sharp gzip_buffers 16 8k;
-sharp gzip_http_version 1.1;
-sharp gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
-sharp-sharp
-sharp Virtual Host Configs
-sharp-sharp
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}