目录
实战情况下还是要准备两台外网服务器.
--还是做个中转
![](https://i-blog.csdnimg.cn/direct/a1b6eb794cc8486b95507779bc8e2987.png)
1、代理机安装Apache:
apt-get install apache2
a2enmod proxy proxy_ajp proxy_balancer proxy_connect proxy_http
systemctl restart apache2
![](https://i-blog.csdnimg.cn/direct/4a2ca9432cfa47c6a6a1570cd97cca8b.png)
2、中间件设置转发:
添加代理
/etc/apache2/sites-enabled/000-default.conf
找到此配置文件
http:
156.238.233.99
ProxyPass "/" "http://CS的IP/"
ProxyPassReverse "/" "http://CS的IP/"
https:
ProxyPass "/" "https://Cs的IP/"
ProxyPassReverse "/" "https://Cs的IP/"
![](https://i-blog.csdnimg.cn/direct/85978c944ac54e62a6b2f75ee60d1410.png)
3、重启Apache服务
service apache2 restart
4、CS监听器配置转发机IP
![](https://i-blog.csdnimg.cn/direct/757498bf6313433a91a9f8f402c73dff.png)
...