- A+

通过进一步沟通,终于明白客户的意思;
ESXI服务器托管在封80 443的机房,安装好以后需要通过SSH改WEB端口。
等了两个多小时,机房才把ESXI给他安装好,拿到SSH后登录服务器;
编辑WEB配置文件
/etc/vmware/rhttpproxy/config.xml
vi /etc/vmware/rhttpproxy/config.xml
原始端口配置如下
<!-- HTTP port to be used by the reverse proxy -->
<httpPort>80</httpPort>
<!-- HTTPS port to be used by the reverse proxy -->
<httpsPort>443</httpsPort>
修改为
<!-- HTTP port to be used by the reverse proxy --> <httpPort>1180</httpPort> <!-- HTTPS port to be used by the reverse proxy --> <httpsPort>1443</httpsPort>
然后再修改防火墙配置文件
/etc/vmware/firewall/service.xml
先改文件权限属性、再编辑文件
chmod 644 /etc/vmware/firewall/service.xml chmod +t /etc/vmware/firewall/service.xml vi /etc/vmware/firewall/service.xml
把如下内容添加到配置文件最后一个标记之前
<service id='0088'> <id>http1180</id> <rule id='0000'> <direction>inbound</direction> <protocol>tcp</protocol> <porttype>dst</porttype> <port>1180</port> </rule> <enabled>true</enabled> <required>false</required> </service> <service id='0089'> <id>hhtps1443</id> <rule id='0000'> <direction>inbound</direction> <protocol>tcp</protocol> <porttype>dst</porttype> <port>902</port> </rule> <rule id='0001'> <direction>inbound</direction> <protocol>tcp</protocol> <porttype>dst</porttype> <port>1443</port> </rule> <enabled>true</enabled> <required>true</required> </service>
现在需要将文件权限恢复回去
chmod 444 /etc/vmware/firewall/service.xml chmod -t /etc/vmware/firewall/service.xml
这个时候,关键的东西来了,为了能保存住配置,防止重启被还原,咱们需要把这个配置文件打个包,放到引导记录里面,让系统能每次自动解包我们的这个修改后的配置文件。
tar -cvpzf service.tgz /etc/vmware/firewall/service.xml BootModuleConfig.sh --add=service.tgz
如果没有报错的话,现在你可以重启然后用刚才设定的端口访问WEB管理页了。
从登陆服务器到重启以后验证效果,耗时15分钟。
- 我的微信
- 这是我的微信扫一扫
-
- 我的微信公众号
- 我的微信公众号扫一扫
-