Skip to content

Instantly share code, notes, and snippets.

@chrisdev
Last active August 29, 2015 14:22
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 chrisdev/c802a0e7eb819c562db7 to your computer and use it in GitHub Desktop.
Save chrisdev/c802a0e7eb819c562db7 to your computer and use it in GitHub Desktop.
Nginx static conf
server {
listen 80;
server_name www.mysite.org;
return 301 $scheme://mysite.org;
}
server {
listen 80;
root /home/myorg/static/myour_static_site;
index index.html index.htm;
access_log /var/log/nginx/myorg_site.log;
error_log /var/log/nginx/myorg_site.log;
server_name mysite.org;
location / {
default_type "text/html";
try_files $uri $uri/ =404;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment