Glassfish应用程序URL [英] Glassfish Application URL
问题描述
我刚刚在我的VPS上安装了 Glassfish
Web配置文件(开源版)。我已经在domain1上成功部署了我的应用程序。现在可以在 http:// localhost / myapplication
I've just installed Glassfish
Web Profile (Open source edition) on my VPS. I have deployed my application successfully on domain1. Now the application is accessible on http://localhost/myapplication
上访问应用程序如何以某种方式配置服务器我的应用程序可在以下地址访问: http:// localhost
How can I config the server in a way my app will be accessible on address: http://localhost
推荐答案
引自我自己对类似问题的回答:
选项1:您可以将其中一个网络应用设置为默认值。这可以通过管理控制台完成:
Option 1: You can set one of your webapps as default. This can be done with the admin console:
配置 - >虚拟服务器 - >服务器
Configuration --> Virtual Servers --> server
然后从下拉菜单中选择您的默认Web应用程序。如果您的网络服务器端口是8080,您现在可以通过以下方式启动您的应用程序:
Then select your default web application from the drop-down menu. If your webserver port is 8080, you can start your application now by:
而不是 http:// hostname:8080 / webapp
请注意,server是Glassfish默认虚拟服务器的名称。如果您为webapp配置了不同的虚拟服务器,则需要相应地进行更改。
Notice that "server" is the name of Glassfish's default virtual server. If you configured a different virtual server for your webapp you need to change it accordingly.
此外关于此来源,JDBCRealms可能存在一些问题。
Furthermore regarding this source, there might be some problems with JDBCRealms.
选项2:您还可以将默认Web应用程序部署为/而不是/ webapp,但我认为第一个选项更灵活。
Option 2: You could also deploy your default webapp to "/" instead of "/webapp" but I think the first option is more flexible.
这篇关于Glassfish应用程序URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!