Skip to content

Instantly share code, notes, and snippets.

@greenkey-m
Created July 5, 2019 20:26
Show Gist options
  • Save greenkey-m/a549b7c15b4f3406e322c0ffe0bca22e to your computer and use it in GitHub Desktop.
Save greenkey-m/a549b7c15b4f3406e322c0ffe0bca22e to your computer and use it in GitHub Desktop.

Revisions

  1. @szarapka szarapka created this gist Feb 2, 2016.
    26 changes: 26 additions & 0 deletions default.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /your/root/path;

    index index.html;

    server_name you.server.com;

    location / {
    try_files $uri $uri/ @rewrites;
    }

    location @rewrites {
    rewrite ^(.+)$ /index.html last;
    }

    location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
    # Some basic cache-control for static files to be sent to the browser
    expires max;
    add_header Pragma public;
    add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }

    }