30 lines
659 B
Text
30 lines
659 B
Text
upstream garm_backend {
|
|
server 192.168.122.100:9997 weight=5;
|
|
}
|
|
|
|
server {
|
|
server_name garm.example.com;
|
|
|
|
location / {
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
|
|
|
proxy_pass http://garm_backend;
|
|
proxy_set_header Host $Host;
|
|
proxy_redirect off;
|
|
}
|
|
|
|
listen 443 ssl;
|
|
ssl_certificate /etc/nginx/ssl/fullchain.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
|
|
}
|
|
|
|
server {
|
|
if ($host = garm.example.com) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server_name garm.example.com;
|
|
listen 80;
|
|
return 404;
|
|
}
|