diff --git a/nginx.conf.example b/nginx.conf.example new file mode 100644 index 0000000..35ee2f7 --- /dev/null +++ b/nginx.conf.example @@ -0,0 +1,36 @@ +server { + listen 80 default; + server_name domain.local; + + location /trigger { + auth_request /auth-1; + proxy_pass http://127.0.0.1:3000/trigger; + proxy_cache_valid 401 404 60s; + location /trigger/api { + proxy_pass http://127.0.0.1:5000; + } + location /trigger/assets { + proxy_pass http://127.0.0.1:3000/assets; + add_header Cache-Control "private, max-age=604800"; + } + location /trigger/backgrounds { + proxy_pass http://127.0.0.1:3000/backgrounds; + add_header Cache-Control "private, max-age=604800"; + } + } + location /favicon.ico { + rewrite ^/gun.jpg /trigger/favicon.ico redirect; + } + location ^~ /assets { + rewrite ^/assets/(.*) /trigger/assets/$1 redirect; + } + location ^~ /images { + rewrite ^/images/(.*) /trigger/images/$1 redirect; + } + location ^~ /backgrounds { + rewrite ^/backgrounds/(.*) /trigger/backgrounds/$1 redirect; + } + location ^~ /api { + rewrite ^/api/(.*) /trigger/api/$1 redirect; + } +} \ No newline at end of file