nginx-Konfiguration: Subfolder-Reverse-Proxy für Webshop und SSV
This commit is contained in:
parent
01f4373a9a
commit
07e8f161b8
62
nginx.conf
62
nginx.conf
|
|
@ -13,11 +13,14 @@ http {
|
|||
|
||||
# Webshop (Django)
|
||||
location /webshop/ {
|
||||
proxy_pass http://webshop-app:8000;
|
||||
rewrite ^/webshop(/.*)$ $1 break;
|
||||
proxy_pass http://webshop-app:8000/webshop/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header SCRIPT_NAME /webshop;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# Weitere Seite
|
||||
|
|
@ -53,28 +56,13 @@ http {
|
|||
|
||||
location /ssv/ {
|
||||
rewrite ^/ssv(/.*)$ $1 break;
|
||||
proxy_pass http://ssv-new-app:8000;
|
||||
proxy_pass http://ssv-app:8000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /pihole/ {
|
||||
auth_basic "Pi-hole Login";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
|
||||
proxy_pass http://pihole:80/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
sub_filter 'href="/' 'href="/pihole/';
|
||||
sub_filter 'src="/' 'src="/pihole/';
|
||||
sub_filter_once off;
|
||||
}
|
||||
|
||||
location /homeassistant/ {
|
||||
proxy_pass http://192.168.178.175:8123/;
|
||||
proxy_set_header Host $host;
|
||||
|
|
@ -102,28 +90,12 @@ http {
|
|||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name pihole;
|
||||
|
||||
auth_basic "Pi-hole Login";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
|
||||
location / {
|
||||
proxy_pass http://pihole:80/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8002;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
proxy_pass http://ssv-new-app:8000/;
|
||||
proxy_pass http://ssv-app:8000/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
|
@ -146,11 +118,14 @@ http {
|
|||
}
|
||||
|
||||
location /webshop/ {
|
||||
proxy_pass http://webshop-app:8000;
|
||||
rewrite ^/webshop(/.*)$ $1 break;
|
||||
proxy_pass http://webshop-app:8000/webshop/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header SCRIPT_NAME /webshop;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
location /seite2/ {
|
||||
|
|
@ -183,28 +158,13 @@ http {
|
|||
|
||||
location /ssv/ {
|
||||
rewrite ^/ssv(/.*)$ $1 break;
|
||||
proxy_pass http://ssv-new-app:8000;
|
||||
proxy_pass http://ssv-app:8000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /pihole/ {
|
||||
auth_basic "Pi-hole Login";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
|
||||
proxy_pass http://pihole:80/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
sub_filter 'href="/' 'href="/pihole/';
|
||||
sub_filter 'src="/' 'src="/pihole/';
|
||||
sub_filter_once off;
|
||||
}
|
||||
|
||||
location /homeassistant/ {
|
||||
proxy_pass http://192.168.178.175:8123/;
|
||||
proxy_set_header Host $host;
|
||||
|
|
|
|||
Loading…
Reference in New Issue