ยง2024-08-25

alexlai@pi3Nginx:/etc/nginx/sites-enabled$ cat /etc/nginx/sites-enabled/upstream-43887 
# port 43887, h2Jammy.yushei.net:43887 Rocket.Chatfor LaiKos

server {
     server_name  munetaka.me:43887;
     charset utf-8;

     location / {
        proxy_pass http://h2Jammy.yushei.net:43887;
        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 43887;

        # WebSocket-specific settings
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';

        # Adjust client max body size if needed
        client_max_body_size 1024m;  # This sets the maximum upload size to 1024 MB

     }

     listen 43887 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
}