1.0前言
我这里使用的openresty,配置路径可能有所不同
因公司需要一个测试环境运行多个项目,只开放一个80端口号,所以nginx需配置多个server
2.0 实现
打开 nginx 安装目录下nginx配置文件
openresty 安装目录
/usr/local/openresty/nginx/conf
vi nginx.conf
配置文件内容
http默认端口 80
server {
#http默认端口 80 htps 默认 443
listen 80;
# 你解析的域名
server_name xxx.xxxx.com;
#charset koi8-r;
#access_log logs/host.access.log main;