時間:2023-02-14 05:06:01 | 來源:建站知識
時間:2023-02-14 05:06:01 來源:建站知識
題目《手機網站怎么安裝 HTTPS 證書?》非常奇怪,網站還分手機網站、電腦網站嗎?當然網站可以分專門給電腦訪問的網站、專門給手機訪問的網站,但在實際的使用、技術層面都是一樣的。因此,大概率又是機器人自己的提問。test.fuyeor.com
為例,將如下代碼添加至 httpd.conf 的<VirtualHost *:443>中,以部署SSL證書在網站:SSLEngine on #開啟SSLSSLProxyEngine OnSSLProxyVerify noneSSLCertificateFile "C:/SSL證書路徑/test.fuyeor.com_public.crt" #公匙證書SSLCertificateKeyFile "C:/SSL證書路徑/test.fuyeor.com.key" #私匙證書SSLCertificateChainFile "C:/SSL證書路徑/test.fuyeor.com_chain.crt" #域名證書
并將 HTTP 重定向到相應的HTTPS站點:<VirtualHost *:80>#網站域名ServerName test.fuyeor.comRewriteEngine on# http 跳轉到https上RewriteRule ^(.*)?$ https://test.fuyeor.com $1 [R=301,L]</VirtualHost># 將 test.fuyeor.com 改成你的域名
Nginx 服務器server {//443端口 listen 443 ssl;//配置域名 server_name test.fuyeor.com; //證書路徑 ssl_certificate /etc/sslfiles/test.fuyeor.com/fullchain.pem; ssl_certificate_key /etc/sslfiles/test.fuyeor.com/privkey.pem; ssl_trusted_certificate /etc/sslfiles/test.fuyeor.com/chain.pem;//網站目錄 location / { root /var/websitefiles/; index index.html; } }
關鍵詞:安裝,證書