How to remove app name and port from url in grails

2020-02-09 07:22发布

Instead of deploying my app to

http://localhost:8080/myApp

I want to deploy it to

http://localhost

3条回答
迷人小祖宗
2楼-- · 2020-02-09 07:51

To remove the port, use:

grails -Dserver.port=80 run-app
查看更多
Emotional °昔
3楼-- · 2020-02-09 08:05

To change the run-app port, edit grails-app/conf/BuildConfig.groovy and add the line

grails.server.port.http = 80

To remove the context (the 'myApp' part) edit application.properties and add the line

app.context=/
查看更多
We Are One
4楼-- · 2020-02-09 08:15

deploy your app to a tomcat server with the war name as ROOT.war. Because war names describe contexts... papa.war will be available through [root_domain]/papa

查看更多
登录 后发表回答