43 lines
1.1 KiB
Text
43 lines
1.1 KiB
Text
|
server {
|
||
|
listen 80;
|
||
|
listen [::]:80;
|
||
|
#server_name gotify.fakeowl1.com;
|
||
|
server_name 192.168.1.102;
|
||
|
|
||
|
location /gotify/.well-known/acme-challenge/ {
|
||
|
root /var/www/certbot/;
|
||
|
}
|
||
|
|
||
|
location /gotify {
|
||
|
return 301 https://$server_name:443$request_uri;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 443 ssl;
|
||
|
listen [::]:443 ssl;
|
||
|
#server_name gotify.fakeowl1.com;
|
||
|
server_name 192.168.1.102;
|
||
|
|
||
|
ssl_certificate /etc/letsencrypt/live/gotify.fakeowl1.com/fullchain.pem;
|
||
|
ssl_certificate_key /etc/letsencrypt/live/gotify.fakeowl1.com/privkey.pem;
|
||
|
|
||
|
location ~ / {
|
||
|
proxy_pass http://gotify:80;
|
||
|
proxy_http_version 1.1;
|
||
|
|
||
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
proxy_set_header Connection "upgrade";
|
||
|
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 http;
|
||
|
proxy_redirect http:// $scheme://;
|
||
|
|
||
|
proxy_set_header Host $http_host;
|
||
|
|
||
|
proxy_connect_timeout 7m;
|
||
|
proxy_send_timeout 7m;
|
||
|
proxy_read_timeout 7m;
|
||
|
}
|
||
|
}
|