42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name portal.monacousa.org;
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
alias /var/www/html/.well-known/acme-challenge/;
|
|
default_type "text/plain";
|
|
allow all;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name portal.monacousa.org;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/portal.monacousa.org/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/portal.monacousa.org/privkey.pem;
|
|
|
|
access_log /var/log/nginx/portal.monacousa.org.access.log combined;
|
|
error_log /var/log/nginx/portal.monacousa.org.error.log warn;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:6060;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "close";
|
|
proxy_set_header 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;
|
|
}
|
|
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
alias /var/www/html/.well-known/acme-challenge/;
|
|
default_type "text/plain";
|
|
allow all;
|
|
}
|
|
}
|