這篇文章將為大家詳細講解有關(guān)使用openstack怎么對80和443端口進行共享,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關(guān)知識有一定的了解。
創(chuàng)新互聯(lián)專注于西城企業(yè)網(wǎng)站建設(shè),成都響應式網(wǎng)站建設(shè)公司,購物商城網(wǎng)站建設(shè)。西城網(wǎng)站建設(shè)公司,為西城等地區(qū)提供建站服務。全流程按需設(shè)計,專業(yè)設(shè)計,全程項目跟蹤,創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務
1.1. 安裝 openresty
1. 向 centos 系統(tǒng)中添加 openresty 倉庫
#yum install yum-utils #yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
2. 安裝軟件包
#yum install openresty
3. 安裝命令行工具
#yum install openresty-resty
1.2. 配置 openresty
1. 進入 nginx 目錄
#cd /usr/local/openresty/nginx/conf/
2. 編輯 nginx 配置文件
#vi nginx.conf user root; worker_processes 12; error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 10240; } 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; include conf.d/*; server { listen 80; # server_name 域名; #指定日志路徑 access_log logs/access.log main; error_log logs/error.log; # location / { proxy_pass http://172.17.17.113; } } }
3. 在當前目錄下創(chuàng)建 conf.d 文件夾
#mkdir /usr/local/openresty/nginx/conf/conf.d #cd conf.d
4. 創(chuàng)建要被讀取的文件,目前定義為每臺機器創(chuàng)建一臺,這里定義添加一臺 aa 機器,則創(chuàng)建 aa.conf 。
#vi aa.conf server { listen 80; #綁定https include /usr/local/openresty/nginx/https/https.conf; #綁定域名 server_name 域名; #指定日志路徑 access_log logs/ope.access.log main; error_log logs/ope.error.log; #指定通過域名跳轉(zhuǎn)端口 location / { proxy_pass http://172.17.17.136:8081; } }
1.3. 使用 openresty
1. 檢測 nginx 是否配置正確
#openresty -t nginx: the configuration file /usr/local/openresty/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test is successful
2. 重載 openresty
#openresty -s reload
3.驗證
在瀏覽器上輸入綁定的域名即可直接訪問80或者所需端口。
關(guān)于使用openstack怎么對80和443端口進行共享就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。
網(wǎng)站欄目:使用openstack怎么對80和443端口進行共享
當前地址:http://aaarwkj.com/article46/igcheg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供面包屑導航、虛擬主機、微信小程序、App設(shè)計、定制開發(fā)、全網(wǎng)營銷推廣
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)