Skip to content

Commit

Permalink
add nginx conf
Browse files Browse the repository at this point in the history
  • Loading branch information
jarededwards committed Sep 3, 2024
1 parent 243427a commit 5709cdb
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
server {
listen 80;
server_name localhost;

# redirect /google/ to /gcp/ for any subpath
location /google/ {
rewrite ^/google/(.*)/$ /gcp/$1/ last;
rewrite ^/google/(.*)$ /gcp/$1 last;
}

# redirect /digitalocean/ to /do/ for any subpath
location /digitalocean/ {
rewrite ^/digitalocean/(.*)/$ /do/$1/ last;
rewrite ^/digitalocean/(.*)$ /do/$1 last;
}

location ~ ^/[^/]+/$ {
try_files $uri /index.html;
autoindex off;
}

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
autoindex off;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

0 comments on commit 5709cdb

Please sign in to comment.