# Global configuration file. # ESSENTIAL : Configure Nginx Listening Port #listen 127.0.0.1:8080; listen 80; # ESSENTIAL : Default file to serve. If the first file isn't found index index.php index.html index.htm; # ESSENTIAL : no favicon logs location = /favicon.ico { log_not_found off; access_log off; } # ESSENTIAL : robots.txt location = /robots.txt { allow all; log_not_found off; access_log off; } # ESSENTIAL : Configure 404 Pages error_page 404 /404.html; # ESSENTIAL : Configure 50x Pages error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } # SECURITY : Deny all attempts to access hidden files .abcde location ~ /\. { deny all; } # Set expires to year on static file types location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm)$ { expires 365d; #root /sites/example.com/public; access_log off; } #location ~* .(jpg|jpeg|png|gif|ico|css|js)$ { # expires 365d; #} # Cache control recommended by google location ~* \.js$ { add_header Cache-Control public; add_header Vary Accept-Encoding; #expires 1d; }