一、nginx反向代理
反向代理服务器:192.168.4.51
HTTP1:192.168.4.52
HTTP2:192.168.4.53
安装方法参考上篇 关键字【nginx安装】
Nginx主机
vim /usr/local/nginx/conf/nginx.conf server { listen 80; #监听端口 server_name ; #用来指定IP地址或者域名,多个域名之间用空格分开 #charset koi8-r; #access_log logs/host.access.log main; location / { #根目录 root html; #指定虚拟主机的网页根目录 proxy_pass http://192.168.4.52:80; #代理的主机和端口 index index.html index.htm; #默认首页地址 } server { listen 80; server_name ; # listen somename:8080; # server_name somename alias another.alias; location / { root html; proxy_pass http://192.168.4.53:80; index index.html index.htm; } }