NGINX exmaple file
This commit is contained in:
36
nginx.conf.example
Normal file
36
nginx.conf.example
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user