ยง2024-09-08

# port 43883, h2Jammy.yushei.net:43883 Rocket.Chatfor Drangonfly28

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

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

        # 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 43883 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
}