ยง2024-05-06

# port 43103, hc4nas02.yushei.net:43101 nextCloud
# upstream nextCloud-01 {
#         server hc4nas02.yushei.net:43101 weight=1;
# }
server {
     server_name  munetaka.me:43103;
     charset utf-8;

     location / {
        # proxy_pass http://nextCloud-01;
        proxy_pass http://hc4nas02.yushei.net:43101;
        # proxy_set_header Host hc4nas02.yushei.net:43101;
        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 https;
        proxy_set_header X-Forwarded-Host munetaka.me;
        proxy_set_header X-Forwarded-Port 43103;

     }

     listen 43103 ssl; # managed by Certbot
     ssl_certificate /etc/letsencrypt/live/munetaka.me/fullchain.pem; # managed by Certbot
     ssl_certificate_key /etc/letsencrypt/live/munetaka.me/privkey.pem; # managed by Certbot
     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}