Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用ipv6非443端口申请ssl使用nginx反代只能登录看不见文件是怎么回事 #41

Open
tiewtouwa opened this issue Feb 3, 2023 · 1 comment

Comments

@tiewtouwa
Copy link

No description provided.

@tiewtouwa
Copy link
Author

忘记清外网浏览器的缓存,唉整半天

root# vim /etc/nginx/conf.d/default.conf
server {
#这个是ipv6的https格式设置只监听ipv6,80 443没备案无法使用
listen [::]:5321 ssl default ipv6only=on;
server_name www.xxxxxxxxxx.com;

    #需要三个月手动更新ssl,没80 443 只能使用dns申请
    ssl_certificate     /etc/letsencrypt/live/www.xxxxxxxxxx.com/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/www.xxxxxxxxxx.com/privkey.pem;

    #应该是加密形式
    ssl_session_timeout  5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    #这下面和官方一致,直接ipv6到ipv4
    location / {
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Range $http_range;
            proxy_set_header If-Range $http_if_range;
            proxy_redirect off;
            proxy_pass http://127.0.0.1:5244;
            # 上传的最大文件尺寸
            client_max_body_size 20000m;
    }

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant