最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

nginx1.18配置SSL問題

標(biāo)簽:
C#

把一个NETCORE网站部署到NGINX上,按微软官方文档弄好了 https://docs.microsoft.com/zh-cn/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1

想配置SSL的HTTPS证书,腾讯云上申请了免费的,之前在WIN+IIS 配置是成功的,按网上的弄好了,我的用的是宝塔的NGINX,可以在网页上建立网站了改NGINX配置文件就行了,

配置好后重启NGINX了,结果不行的,搜索一翻,原来是centos服务器自带的firewall防火墙的问题,https://www.jianshu.com/p/17b73ad6a4b8, xshel上运行以下命令就行了



firewall-cmd --zone=public --add-port=443/tcp --permanent  增加443端口

firewall-cmd --reload  重启防火墙



或者直接就把防火墙停掉


systemctl stop firewalld


其他备注:

在xshell 里登录LINUX服务器后,输入BT命令,可以查看宝塔默认的安装信息


https://img1.sycdn.imooc.com//5f30fd8c00013b2615380808.jpg

https://img1.sycdn.imooc.com//5f30fd8c000145e519100461.jpg



以下是我的nginx配置文件:


 server {
listen 80;
server_name tudi.niunan.net;
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_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
} 
server {
     #SSL 访问端口号为 443
     listen 443 ssl; 
     #填写绑定证书的域名
     server_name tudi.niunan.net;
     #证书文件名称
     ssl_certificate /www/server/nginx/conf/1_tudi.niunan.net_bundle.crt; 
     #私钥文件名称
     ssl_certificate_key /www/server/nginx/conf/2_tudi.niunan.net.key; 
     ssl_session_timeout 5m;
     #请按照以下协议配置
     ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 
     #请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; 
     ssl_prefer_server_ciphers on;
     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_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;

     }
 }



點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺得本文不錯(cuò),就分享一下吧!

評(píng)論

作者其他優(yōu)質(zhì)文章

正在加載中
  • 推薦
  • 評(píng)論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評(píng)論
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊有機(jī)會(huì)得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會(huì)
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)

舉報(bào)

0/150
提交
取消