IDC资讯

质量为本、客户为根、勇于拼搏、务实创新

< 返回IDC资讯列表

使用openstack怎么对80和443端口进行共享

发布时间:2022-05-30

这篇文章将为大家详细讲解有关使用云计算怎么对80和443端口进行共享,文章内容质量较高,因此桂哥网络分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

1.1.安装章亦春

1.向摘录系统中添加章亦春仓库

#yuminstallyum-utils

#百胜-配置-经理-add-repohttps://openresty.org/package/centos/openresty.repo2。安装软件包

# yuminstallopenresty3 .安装命令行工具

# yuminstallopenresty-resty1.2. 配置 openresty

1.进入服务器目录

# CD/usr/local/open resty/nginx/conf/2 .编辑服务器配置文件

#vinginx.conf

userroot

工作进程12

错误日志/错误。日志;

# error _ log log/error。日志通知;

# error _ log log/error。登录fo;

# PID日志/nginx。PID

事件{

worker _ connections10240

}

http{

includemime.types

default _ type应用程序/八位字节流;

log _ format main ' $ remote _ addr-$ remote _ user[$ time _ local]' $ request ' '

$ status $ body _ bytes _ send ' $ http _ refer ' '

" $ http _ user _ agent " " $ http _ x _ forward _ for " ";

access _ log log/access。log main

sendfileon

# tcp _ nopushon

# keepalive _ timeout0

keepalive _ timeout65

# gzipon

包括cf . d/*;

服务器{

列表80

#

服务器名域名;

#指定日志路径

access _ log log/access。log main

错误日志/错误。日志;

#

位置/

proxy _ pass http://172。17 .17 .113;

}

}

}3.在当前目录下创建会议d文件夹

# mkdir/usr/local/open resty/nginx/conf/conf .d

#cdconf.d4 .创建要被读取的文件,目前定义为每台机器创建一台,这里定义添加一台块状熔岩机器,则创建aa.conf .

#viaa.conf

服务器{

列表80

#绑定https包括/usr/local/open resty/nginx/https/https。conf

#绑定域名

服务器名域名;

#指定日志路径

access _ log logs/ope。进入。log main

error _ log logs/ope。错误。日志;

#指定通过域名跳转端口

位置/

proxy _ pass http://172。17 .13633608081

}

}1.3. 使用 openresty

1.检测服务器是不是配置正确

#openresty-t

nginx :配置文件/usr/local/open resty/nginx/conf/nginx。confsyntaxisok

nginx :配置文件/usr/local/open resty/nginx/conf/nginx。成功2 .重载章亦春

#openresty-sreload3 .验证

在浏览器上输入绑定的域名即可直接访问80或者所需端口。

关于使用云计算怎么对80和443端口进行共享就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。


TikTok千粉号购买平台:https://tiktokusername.com/