
目录
Linux 安装MYSQL、CentOS7中使用yum安装Nginx的方法_JoneClassMate的博客-CSDN博客
systemctl start nginx
systemctl status nginx
C:\Windows\System32\drivers\etc

- #前面数字部分你的虚拟机ip
- #后面部分修改后的虚拟域名
- 192.168.119.128 www.zking.com
命令
vim /etc/nginx/conf.d/default.conf
- #服务器的集群
- upstream tomcat_list {
- server 192.168.119.128:8080 weight=1; #服务器1 weight是权重的意思,权重越大,分配的概率越大。
- server 192.168.119.128:8081 weight=1; #服务器2 weight是权重的意思,权重越大,分配的概率越大
- }
- location ^~/api/ {
- proxy_pass http://tomcat_list/;
- }
systemctl restart nginx
setsebool -P httpd_can_network_connect 1
systemctl restart nginx