国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

阿里云申請域名及域名配置https

這篇具有很好參考價值的文章主要介紹了阿里云申請域名及域名配置https。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

1、阿里云域名申請

阿里云申請域名及域名配置https
阿里云申請域名及域名配置https
買到域名之后,要對域名進(jìn)行實名認(rèn)證(上傳身份證并拍照)(阿里云審核一天)

2、域名工信部備案

1、阿里云域名備案,這個也要實名認(rèn)證,其中阿里云員工審核并打電話(半天左右)
2、工信部短信驗證,直接把驗證碼,身份證短信驗證一下就行(短信時間一兩天左右),并提交管局審核

阿里云申請域名及域名配置https
3、域名資料交管局審核(一個星期左右),時間久一些,具體看一看短信時間
阿里云申請域名及域名配置https

3、申請阿里云免費ssl證書,阿里云單域名證書

阿里云申請域名及域名配置https
2、網(wǎng)上申請證書的教程很多大同小異,但是現(xiàn)在阿里云免費證書頁面改版了,有一點點不同
阿里云申請域名及域名配置https

阿里云申請域名及域名配置https
3、證書申請并下載
阿里云申請域名及域名配置https

4、配置阿里云免費證書

1、Nginx配置證書

原本的config原生頁面如下
阿里云申請域名及域名配置https


#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}

可以查看Nginx部署證書的幫助文檔
阿里云申請域名及域名配置https
2、我結(jié)合文檔總結(jié)一下
1、下載到配置好域名的證書,服務(wù)器自定義的文件夾下面
2、在需要的端口配置證書位置,和方式
3、開放443端口

下面是阿里云443配置的代碼

#以下屬性中,以ssl開頭的屬性表示與證書配置有關(guān)。
server {
    listen 443 ssl;
    #配置HTTPS的默認(rèn)訪問端口為443。
    #如果未在此處配置HTTPS的默認(rèn)訪問端口,可能會造成Nginx無法啟動。
    #如果您使用Nginx 1.15.0及以上版本,請使用listen 443 ssl代替listen 443和ssl on。
    server_name yourdomain.com; #需要將yourdomain.com替換成證書綁定的域名。
    root html;
    index index.html index.htm;
    ssl_certificate cert/cert-file-name.pem;  #需要將cert-file-name.pem替換成已上傳的證書文件的名稱。
    ssl_certificate_key cert/cert-file-name.key; #需要將cert-file-name.key替換成已上傳的證書密鑰文件的名稱。
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    #表示使用的加密套件的類型。
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #表示使用的TLS協(xié)議的類型。
    ssl_prefer_server_ciphers on;
    location / {
        root html;  #站點目錄。
        index index.html index.htm;
    }
}

3、我的配置帶證書的nginx.conf如下


#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name www.jianghaojie.xyz; #需要將yourdomain.com替換成證書綁定的域名。
        #配置的證書
        listen 443 ssl;
        ssl_certificate cert/5883433_www.jianghaojie.xyz.pem;  #需要將cert-file-name.pem替換成已上傳的證書文件的名稱。
        ssl_certificate_key cert/5883433_www.jianghaojie.xyz.key; #需要將cert-file-name.key替換成已上傳的證書密鑰文件的名稱。
        ssl_session_timeout 5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        #表示使用的加密套件的類型。
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #表示使用的TLS協(xié)議的類型。
        ssl_prefer_server_ciphers on;

        location / {
            root   html;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}
}

在server中主要添加的東西如下,配置pom 和key的地址

        listen 443 ssl;
        ssl_certificate cert/5883433_www.jianghaojie.xyz.pem;  #需要將cert-file-name.pem替換成已上傳的證書文件的名稱。
        ssl_certificate_key cert/5883433_www.jianghaojie.xyz.key; #需要將cert-file-name.key替換成已上傳的證書密鑰文件的名稱。
        ssl_session_timeout 5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
        #表示使用的加密套件的類型。
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #表示使用的TLS協(xié)議的類型。
        ssl_prefer_server_ciphers on;

4、重啟nginx

cd /usr/local/nginx/sbin
./nginx -s reload

5、開放443端口
阿里云上開放443端口
阿里云申請域名及域名配置https
6、服務(wù)器上開放443端口,并重啟防火墻

# 增加443端口
 firewall-cmd --zone=public --add-port=443/tcp --permanent
 # 重啟防火墻
 firewall-cmd --reload
 

重啟好了打開你的頁面,帶https的就能訪問了
阿里云申請域名及域名配置https

nginx反向代理多個后臺端口

因為多個小程序部署,所以需要使用到多個后臺,這樣就需要nginx做反向代理,一個服務(wù)器只能安裝一個ssl證書綁定80端口,所以這里用nginx代理來解決,
上面已經(jīng)配置好了nginx及域名證書了,下面開始配置多個IP加端口

如下所示


        location / {
            root   html;
            index  index.html index.htm;
        }

       location /xx{
         proxy_pass   http://你的ip:你的端口/;
         proxy_redirect off;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       }
       location /yy{
         proxy_pass   http://IP:端口/;
         proxy_redirect off;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

這樣就可以通過不同的/xx 或者 /yy 來區(qū)別代理不同的地址了。

https代理多個vue項目

server {
listen 443 ssl;
server_name 域名; #需要將yourdomain.com替換成證書綁定的域名。
#配置的證書
ssl_certificate cert/public.pem; #需要將cert-file-name.pem替換成已上傳的證書文件的名稱。
ssl_certificate_key cert/private.key; #需要將cert-file-name.key替換成已上傳的證書密鑰文件的名稱。
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
#表示使用的加密套件的類型。
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #表示使用的TLS協(xié)議的類型。
ssl_prefer_server_ciphers on;
#項目一
location / {
root /home/dbxq/dl/dist; #dist文件的位置(根據(jù)自己dist包放置的位置決定)
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
#項目二
location /ht {
alias /home/dbxq/ht/dist/;
try_files $uri $uri/ /ht/index.html;
index index.html;
}
#項目minio配置
location /fileShow/ {
proxy_pass http://172.43.130.196:9000/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#后端接口配置配置
location /prod-api/ {
proxy_pass http://172.43.130.195:7006/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

2、 第一個項目直接用/ 就可以訪問,第二個因為加了/ht ,所以在vue.config.js下面的publicPath要改路徑 ,
阿里云申請域名及域名配置https
阿里云申請域名及域名配置https
這樣打包的dist文件夾下面的index.html可以看到如下這樣,就OK了
阿里云申請域名及域名配置https文章來源地址http://www.zghlxwxcb.cn/news/detail-488224.html

到了這里,關(guān)于阿里云申請域名及域名配置https的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • Https域名解析——騰訊云免費SSL證書申請流程

    Https域名解析——騰訊云免費SSL證書申請流程

    最近購買了一臺騰訊云服務(wù)器,采用騰訊免費域名解析,只是綁定成功http請求及www請求。網(wǎng)站地址為:http://kalehu.com https一直不能訪問,一直以為騰訊云與阿里虛擬主機(jī)綁定一樣,只需勾選一個選項,可以直接完成,后來發(fā)現(xiàn)思路是錯誤。服務(wù)器綁定https,需要申請SSL證書之

    2024年02月09日
    瀏覽(93)
  • 利用FreeSSL為域名免費申請Https證書指南(一年續(xù)一次)

    利用FreeSSL為域名免費申請Https證書指南(一年續(xù)一次)

    打開FreeSSL網(wǎng)站(https://freessl.cn/)并輸入域名(主域名即可),選擇第二個雙域名,即同時申請www和不含www的域名的證書 ?點擊“創(chuàng)建免費的SSL證書”,輸入郵箱,核對一下申請證書的域名,下面選項可以不改,點擊“點擊創(chuàng)建” ?此時跳轉(zhuǎn)的網(wǎng)頁提示需要登錄,如之前注冊

    2024年02月04日
    瀏覽(28)
  • eu.org申請免費域名 免費域名申請教程

    eu.org申請免費域名 免費域名申請教程

    EU.org是由Paul Mockapetris在1996年創(chuàng)建的免費域名服務(wù),給沒有資金買域名的個人或公司提供永久免費的域名。雖然是二級域名,但是已經(jīng)被一些網(wǎng)絡(luò)公司(當(dāng)然是國外的)認(rèn)定為頂級域名。 優(yōu)點:穩(wěn)定性高、幾乎沒有限制、支持修改NS 缺點:需要人工審核通過,只有英文界面,

    2024年02月06日
    瀏覽(25)
  • 支付寶"手機(jī)網(wǎng)站支付"主域名申請了,二級域名還要申請嗎

    支付寶"手機(jī)網(wǎng)站支付"主域名申請了,二級域名還要申請嗎

    申請地址:https://b.alipay.com 如圖: 當(dāng)然,要登錄以后才可以申請的,那么問題來了, 登錄哪一個帳號呢 ? 就這個問題,我專門咨詢了支付寶人工客服,給出的回復(fù)是: 主體需是企業(yè)或者個人工商戶 ,那么言外之意就是 個人賬戶不可以 了,看圖 ? 我復(fù)制了一遍,如下:

    2024年02月12日
    瀏覽(24)
  • 站長公益主機(jī),免費主機(jī)?免費域名?博客申請?論壇申請

    站長公益主機(jī),免費主機(jī)?免費域名?博客申請?論壇申請 在出教程之前準(zhǔn)備好久,測試搭建輕量論壇無壓力 選用穩(wěn)定免費域名?免費主機(jī)分銷給,可以套CDN使用 堅持免費時間是大廠不能媲美,剛開始做網(wǎng)站時用的是這個分銷,獨立會員控制面板,大方簡潔 參考地址:ht

    2024年02月13日
    瀏覽(63)
  • 免費域名申請

    免費域名申請

    title: 免費域名申請 20230428153405|left ?? Description : ? 本文將介紹如何免費申請域名,在最近的折騰中發(fā)現(xiàn),域名真的很重要,不然好多服務(wù)是無法訪問的。 備注 :由于freenom基于技術(shù)原因,暫時停止免費域名的申請,所以最后作者是在阿里云里面花了6塊錢申請了域名。 Fr

    2024年02月02日
    瀏覽(30)
  • Freenom申請免費域名

    Freenom申請免費域名

    一枚郵箱 1.點擊這里,查看你自己的IP所在國家 2.打開Freenom官網(wǎng) 3.依次點擊“Partners”→“Developers” 4.把網(wǎng)頁往下拉,點擊綠色的“Get a Random Domains Account today!” 5.輸入郵箱地址,然后點擊“Verify my Email address” 6.檢查收件箱內(nèi)的Freenom激活郵件 7.在彈出的網(wǎng)頁中,輸入你自己

    2024年02月06日
    瀏覽(31)
  • 域名申請、備案、解析完整流程及其詳細(xì)描述

    域名申請、備案、解析完整流程及其詳細(xì)描述

    對于個人用戶而言,擁有一個屬于自己的域名不僅可以更好的上線自己一些學(xué)習(xí)的項目或者開發(fā)的項目 (SpringCloud-GateWay服務(wù)關(guān)于nginx域名的轉(zhuǎn)發(fā)) ,還可以方便地管理和發(fā)布自己的個人網(wǎng)站或博客。在阿里云上購買、申請和備案個人域名非常簡單,本文將為您詳細(xì)介紹如何

    2024年01月17日
    瀏覽(46)
  • 免費域名證書最新申請方式大全

    免費域名證書最新申請方式大全

    目前市場環(huán)境下,可獲得域名SSL證書的方式有很多,一般有付費和免費劃分。對于想免費使用域名SSL證書的朋友,這里收集整理了幾個常用的SSL證書申請方式。 對于SSL證書的用處,簡單的來說,就是加密數(shù)據(jù)傳輸,使得數(shù)據(jù)更加安全不被篡改。而且如果不給自己的網(wǎng)站配置

    2023年04月14日
    瀏覽(31)
  • 申請F(tuán)reenom免費頂級域名的正確做法

    申請F(tuán)reenom免費頂級域名的正確做法

    申請F(tuán)reenom免費頂級域名的正確做法 - 南巖のBlog https://blog.nanyan.cc/posts/f3a0.html 申請F(tuán)reenom免費頂級域名的正確做法 - 知乎 https://zhuanlan.zhihu.com/p/157588083 對于新手個人站長,買一個幾十塊甚至幾百塊的域名顯然不太合適。所以,F(xiàn)reenom出現(xiàn)了。它能幫我們免費注冊.ga .ml .tk .gq .c

    2023年04月08日
    瀏覽(28)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包