Skip to content

Instantly share code, notes, and snippets.

@cjus
Last active July 12, 2023 14:59
Show Gist options
  • Select an option

  • Save cjus/b46a243ba610661a7efb to your computer and use it in GitHub Desktop.

Select an option

Save cjus/b46a243ba610661a7efb to your computer and use it in GitHub Desktop.

Revisions

  1. cjus revised this gist Jul 19, 2014. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions sample-nginx.conf
    Original file line number Diff line number Diff line change
    @@ -4,10 +4,6 @@ server {
    index index.html;

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

    location @angular {
    rewrite ^(.*)$ /index.html last;
    try_files $uri $uri/ /index.html;
    }
    }
  2. cjus created this gist Jul 19, 2014.
    13 changes: 13 additions & 0 deletions sample-nginx.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    server {
    server_name yoursite.com;
    root /usr/share/html;
    index index.html;

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

    location @angular {
    rewrite ^(.*)$ /index.html last;
    }
    }