在 Linux 上使用 Docker 部署,部署成功后使用 IP 访问正常,配置 Nginx 域名访问后报错“内核连接中断”。
Linux 版本:Ubuntu 20.04 LTS (Focal Fossa)
Nginx 配置:
server {
server_name note.zander.fun;
server_name_in_redirect on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
charset utf-8;
add_header X-Frame-Options 'SAMEORIGIN';
add_header X-XSS-Protection '1; mode=block';
add_header X-Content-Type-Options 'nosniff';
add_header Strict-Transport-Security 'max-age=31536000';
location / {
proxy_pass http://localhost:6806;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/note.zander.fun/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/note.zander.fun/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
}
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于