52 lines
1.2 KiB
Nginx Configuration File
52 lines
1.2 KiB
Nginx Configuration File
#
|
|
# SPDX-FileCopyrightText: 2023 Afnic
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
#
|
|
|
|
events {
|
|
}
|
|
|
|
http {
|
|
upstream console {
|
|
server 172.31.0.10:3000;
|
|
}
|
|
|
|
upstream webmail {
|
|
server 172.31.20.1:8225;
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
|
|
location / {
|
|
return 302 /console;
|
|
}
|
|
|
|
location /console {
|
|
proxy_connect_timeout 1s;
|
|
proxy_read_timeout 5s;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-Host $host:8080;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Protocol $scheme;
|
|
proxy_pass http://console;
|
|
}
|
|
|
|
location /webmail { return 302 /webmail/; }
|
|
|
|
location /webmail/ {
|
|
proxy_connect_timeout 1s;
|
|
proxy_read_timeout 5s;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Forwarded-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 X-Forwarded-Path "/webmail";
|
|
proxy_pass http://webmail/;
|
|
}
|
|
}
|
|
}
|