NGINX exmaple file

This commit is contained in:
2025-06-19 19:25:18 -05:00
parent 807302144e
commit 5851ece6b0

36
nginx.conf.example Normal file
View File

@@ -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;
}
}