我已经成功托管了一个 ASPNET Core Web 应用,使用 HTTP 传递
proxy_pass http://localhost:5000;
对于 nginx,现在我在设置 HTTPS 时遇到了问题,我已经完成了sudo certbot --nginx -d my.domain.com
,并在我的/etc/nginx/sites-available-default
server {
listen 443 ssl;
server_name my.domain.com;
ssl_certificate /fullchain.pem;
ssl_certificate /privkey.pem;
include /options-ssl-nginx.conf;
ssl_dhparam /ssl-dhparams.pem;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_set_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
忽略路径,我只是无法复制整个内容,因为我在 putty 中使用 tmux,哈哈。
我究竟做错了什么?