注意:前提是公网域名通过备案和域名解析
![image-1650724317602](https://i-blog.csdnimg.cn/blog_migrate/31bf82e159988878a034ab54b3520dc2.png)
1.安装nginx
yum install -y nginx
2.找到安装nginx.conf文件
server {
listen 80;
listen [::]:80;
server_name xxx.com.cn;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
# root html;
# index index.html index.htm;
proxy_pass http://101.43.39.xx:8090;
}
error_page 404 /404.html;
location = /404.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
![image-1650723532080](https://i-blog.csdnimg.cn/blog_migrate/ee1bfe81275858fed0a4379f71284032.png)
3.重启nginx服务
cd /usr/sbin
./nginx -s reload
![image-1650723602412](https://i-blog.csdnimg.cn/blog_migrate/6593f7d1a13fffda42387d7df6adb5ea.png)
4.修改成功
![image-1650723821166](https://i-blog.csdnimg.cn/blog_migrate/114f1fd3feab9c0d8de4d14ca010b876.png)