Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to share ports 80 and 443 with openstack

2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to use openstack to share ports 80 and 443. the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

1.1. Install openresty

1. Add an openresty repository to the centos system

# yum install yum-utils#yum-config-manager-- add-repo https://openresty.org/package/centos/openresty.repo

two。 Install the package

# yum install openresty

3. Install command line tools

# yum install openresty-resty

1.2. Configure openresty

1. Enter the nginx directory

# cd / usr/local/openresty/nginx/conf/

two。 Edit nginx profile

# vi nginx.confuser root;worker_processes 12 worker_connections 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 Domain name # specify log path access_log logs/access.log main; error_log logs/error.log; # location / {proxy_pass http://172.17.17.113;}

3. Create a conf.d folder under the current directory

# mkdir / usr/local/openresty/nginx/conf/conf.d#cd conf.d

4. To create a file to be read, it is currently defined as one per machine. Here, if you add an aa machine, create an aa.conf.

# vi aa.confserver {listen 80th # bind https include / usr/local/openresty/nginx/https/https.conf;# bind domain server_name domain name; # specify log path access_log logs/ope.access.log main; error_log logs/ope.error.log;# specify domain name jump port location / {proxy_pass http://172.17.17.136:8081;}}

1.3. Use openresty

1. Check whether nginx is configured correctly

# openresty-tnginx: the configuration file / usr/local/openresty/nginx/conf/nginx.conf syntax is oknginx: configuration file / usr/local/openresty/nginx/conf/nginx.conf test is successful

two。 Overload openresty

# openresty-s reload

3. Verification

Enter the bound domain name on the browser to access 80 or the desired port directly.

On how to use openstack to share port 80 and port 443 to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report