server { listen 8081; server_name localhost; port_in_redirect off; location / { root /var/www/blog; index index.html index.htm; # Specify the default files to serve try_files $uri $uri/ =404; # Return a 404 if the file is not found allow 127.0.0.1; deny all; } }