Files
Reverse_proxy_Nginx/conf.d/router.tryton.geeraert.eu.conf
T

48 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
############################################
# config file for router
############################################
upstream router_backend {
server 192.168.88.1;
server 1.1.1.1 backup;
}
server {
server_name router.tryton.geeraert.eu www.router.tryton.geeraert.eu;
location / {
proxy_pass http://router_backend;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
auth_basic "Administrator’s Area";
auth_basic_user_file /authentication-htpasswd/.htpasswd;
}
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/live/tryton.geeraert.eu/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/tryton.geeraert.eu/privkey.pem;
}
server {
if ($host = www.router.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
}
if ($host = router.tryton.geeraert.eu) {
return 301 https://$host$request_uri;
}
server_name www.router.tryton.geeraert.eu router.tryton.geeraert.eu;
listen 80;
return 404;
}