Jump to content

如何通过其他设备的nginx反代unraid的webui?


Go to solution Solved by Earsum,

Recommended Posts

感谢,配置了 ws 之后就正常了,脑子糊涂了忘记了

 

下面是我的nginx.conf文件,仅供参考,敏感信息已经隐去。

 

upstream unraid {
    server 192.168.199.200;
    keepalive 64;
}

server {
    listen 80;
    listen [::]:80;
    server_name unraid.example.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name unraid.example.com;

    access_log /tmp/log/nginx/unraid.access.log;
    error_log /tmp/log/nginx/unraid.error.log;

    ssl_protocols TLSv1.3;
    ssl_prefer_server_ciphers on;

    ssl_ciphers EECDH+AESGCM:EDH+AESGCM;

    ssl_session_timeout 10m;
    ssl_session_cache shared:SSL:10m;
    ssl_session_tickets off;

    ssl_certificate /etc/acme/*.example.com/*.example.com.cer;
    ssl_certificate_key /etc/acme/*.example.com/*.example.com.key;

    location / {
        proxy_pass http://unraid;

        proxy_http_version 1.1;
        proxy_buffering off;
        proxy_set_header Host $http_host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        
        proxy_redirect off;
    }
}

 

Edited by VergilGao
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...