国产视频中文字幕,精品国产_亚洲人成在线高清,亚洲天堂手机在线

產(chǎn)品中心 業(yè)內(nèi)新聞 案例中心 視頻中心

通過Nginx訪問的https的5121轉(zhuǎn)向到http的5021 通過Nginx訪問的https的5121轉(zhuǎn)向到http的5021

通過Nginx訪問的https的5121轉(zhuǎn)向到http的5021

通過Nginx訪問的https的5121轉(zhuǎn)向到http的5021

 

Oifilewebs 是http ,5021 端口

我們小程序部署后,必須采用 https 訪問,因此若不做處理,小程序直接下載或瀏覽文件會造成無法瀏覽或下載的現(xiàn)象

 

解決方法:

  • 在OIFilewebs的服務(wù)器上部署Nginx
  • Nginx監(jiān)聽5121端口,采用 ssl 模式
  • 之后通過 Nginx將訪問 5121端口的,轉(zhuǎn)接到 5021

 

Nginx的conf 文件

events {

worker_connections? 1024;? ## Default: 1024

}

 

http {

client_max_body_size 100m;

 

server {

listen? 5121 ssl;

# 這個file.activesoft.cn有ssl證書的域名

server_name file.activesoft.cn;

 

# 這個是證書的crt文件所在目錄

ssl_certificate????? ? ../ssl/FullSSL.crt;

# 這個是證書key文件所在目錄

ssl_certificate_key???? ../ssl/SSL.key;

 

ssl_session_cache??? shared:SSL:1m;

ssl_session_timeout? 5m;

 

ssl_ciphers? HIGH:!aNULL:!MD5;

ssl_prefer_server_ciphers? on;

 

location / {

index index.html index.htm index.php;

proxy_redirect off ;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header REMOTE-HOST $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_connect_timeout 600;

proxy_send_timeout 600;

proxy_read_timeout 600;

proxy_buffer_size 1600k;

proxy_buffers 4 3200k;

proxy_busy_buffers_size 6400k;

proxy_temp_file_write_size 6400k;

proxy_max_temp_file_size 128m;

proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;

 

# 我們將 Https 對 5121 的訪問轉(zhuǎn)換到:http的 5021 (oifilewebs端口上)

proxy_pass http://127.0.0.1:5021;

}

}

}

 

注意:Conf 文件修改后,要重啟 nginx服務(wù)

 

針對文件服務(wù)器配置也需要做調(diào)整

注意: url 定義是

https://mfile.activesoft.cn:5121

這個,對應(yīng)的是 Nginx的 5121 的ssl 端口

標(biāo)簽:手冊方案 上一篇: 下一篇:
展開更多
預(yù)約軟件體驗

loading...

    <noscript id="7lhqw"><i id="7lhqw"><legend id="7lhqw"></legend></i></noscript>
    <u id="7lhqw"><optgroup id="7lhqw"><listing id="7lhqw"></listing></optgroup></u>
    1. <blockquote id="7lhqw"><center id="7lhqw"></center></blockquote>
      <address id="7lhqw"></address>
      主站蜘蛛池模板: 白城市| 伊通| 张家口市| 昌都县| 宜宾市| 芮城县| 沁水县| 曲周县| 盐津县| 梨树县| 安泽县| 阳信县| 久治县| 米泉市| 读书| 合水县| 阳原县| 海盐县| 贵州省| 西城区| 金川县| 奈曼旗| 屏南县| 新河县| 清水河县| 濮阳市| 平南县| 湖州市| 宝应县| 深水埗区| 凉山| 临沧市| 安远县| 八宿县| 政和县| 青田县| 乐平市| 海原县| 岗巴县| 灌云县| 大洼县|