66 lines
2.4 KiB
Plaintext
66 lines
2.4 KiB
Plaintext
server {
|
|
server_name www.ascoetpi.ovh;
|
|
listen 443 ssl;
|
|
ssl_certificate /etc/nginx/ssl/www.ascoetpi.ovh_P256/fullchain.cer;
|
|
ssl_certificate_key /etc/nginx/ssl/www.ascoetpi.ovh_P256/private.key;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
# access_log /var/log/nginx/ubooquity_access.log;
|
|
# access_log off;
|
|
# error_log /var/log/nginx/ubooquity_error.log;
|
|
location /library/ {
|
|
proxy_pass http://127.0.0.1:2039;
|
|
proxy_set_header Host $http_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;
|
|
# HTTP 1.1 support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
}
|
|
location /library/admin {
|
|
proxy_pass http://127.0.0.1:2038/library/admin;
|
|
proxy_set_header Host $http_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;
|
|
# HTTP 1.1 support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
}
|
|
location /library/admin-res {
|
|
proxy_pass http://127.0.0.1:2038/library/admin-res;
|
|
proxy_set_header Host $http_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;
|
|
# HTTP 1.1 support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
}
|
|
location /library/admin-api {
|
|
proxy_pass http://127.0.0.1:2038/library/admin-api;
|
|
proxy_set_header Host $http_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;
|
|
# HTTP 1.1 support
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
}
|
|
location ~ /.well-known/acme-challenge {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real_IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
|
|
proxy_pass http://127.0.0.1:9180;
|
|
}
|
|
}
|
|
server {
|
|
if ($host = ascoet.duckdns.org) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
# managed by Certbot
|
|
server_name ascoet.duckdns.org;
|
|
listen 80;
|
|
return 404;
|
|
} |