user nginx; worker_processes auto; events { worker_connections 1024; } http { server { server_tokens off; listen 8080; root /usr/share/nginx/html; include /etc/nginx/mime.types; location / { # # This sets the authentication realm name # auth_basic "Restricted Access"; # # This specifies the location of the .htpasswd file # auth_basic_user_file /usr/share/nginx/html/.htpasswd; try_files $uri $uri/ /index.html; } gzip on; gzip_vary on; gzip_http_version 1.0; gzip_comp_level 5; gzip_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/svg+xml image/x-icon text/css text/plain text/x-component; gzip_proxied no-cache no-store private expired auth; gzip_min_length 256; gunzip on; } }