Skip to content

Instantly share code, notes, and snippets.

@vaibhavmule
Forked from mockra/nginx
Last active December 11, 2015 16:12
Show Gist options
  • Save vaibhavmule/eff9946ab7c23b8d8c06 to your computer and use it in GitHub Desktop.
Save vaibhavmule/eff9946ab7c23b8d8c06 to your computer and use it in GitHub Desktop.
Nginx config for hosting static site. Change "yourdomain.com" with you domain name.
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