Skip to content

Instantly share code, notes, and snippets.

@mockra
Last active May 17, 2022 15:39
Show Gist options
  • Select an option

  • Save mockra/9062657 to your computer and use it in GitHub Desktop.

Select an option

Save mockra/9062657 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;
}
}
@gogotanaka

Copy link
Copy Markdown

I really appreciate your documents!(http://mockra.com/2014/02/17/nginx-static-sites/ )

Thank you!

@andriyfm

andriyfm commented Mar 7, 2018

Copy link
Copy Markdown

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment