如何在端口 80 而不是 8080 上运行 glassfish 4?root 访问不是问题 [英] How to run glassfish 4 on port 80 instead of 8080? root access is not an issue

查看:29
本文介绍了如何在端口 80 而不是 8080 上运行 glassfish 4?root 访问不是问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否使用了一些谷歌,解决方案是在 apache 中使用 iptables 或 mod 进行重定向?由于我的应用程序使用 websockets,上述解决方案破坏了我的 websocket 连接,我再次必须使用端口 8080 连接到我的 websockets.有什么方法可以让我在端口 80 上运行 glassfish,这样我的 websockets 也可以在端口 80 上运行,从而更容易由于企业可能会阻止 8080,因此企业防火墙后面的用户可以访问该应用程序.

Did some google on it and the solution was to redirect using iptables or mod in apache? Since my application uses websockets the above solution breaks my websocket connectivity and I again have to connect to my websockets using port 8080. Is there any way that I can run the glassfish itself on port 80 so that my websockets also run on port 80 making easier for users behind corporate firewall to access the app since corparates may block 8080.

我也有 root 访问权限.

I have root access as well.

推荐答案

要在端口 80 上运行 GlassFish,您需要:

To run GlassFish on port 80 you need to :

  1. 连接到管理界面(默认端口:4848)

  1. Connect to the administration interface (by default on port :4848)

在左侧菜单中转到配置

然后选择您需要更改的适当配置,例如server-config

Then select the appropriate configuration you need to change eg server-config

然后转到网络配置

然后转到网络监听器

选择合适的监听器,可能是http-listener-1

Select the appropriate listener, probably http-listener-1

端口值更改为80

根据您的需要保存并重启您的 GlassFish 服务器/实例/集群

Save and reboot your GlassFish server/instance/cluster according to your needs

使用命令行实用程序

asadmin set configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1.port=80 

您可能需要替换 server-config 和/或 http-listener-1

you may need to replace server-config and/or http-listener-1

这篇关于如何在端口 80 而不是 8080 上运行 glassfish 4?root 访问不是问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆