Skip to content

Instantly share code, notes, and snippets.

@mudivili
Forked from mockra/nginx
Created August 16, 2017 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mudivili/2ba76e74ca15a5f05bbf6348a5a21af1 to your computer and use it in GitHub Desktop.
Save mudivili/2ba76e74ca15a5f05bbf6348a5a21af1 to your computer and use it in GitHub Desktop.
nginx config for static site
server {
listen 80;
root /var/www/yourdomain.com/public;
index index.html index.htm;
server_name yourdomain.com;
location / {
default_type "text/html";
try_files $uri.html $uri $uri/ /index.html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment