How to remove app name and port from url in grails?

纵然是瞬间 提交于 2019-11-27 15:48:08

问题


Instead of deploying my app to

http://localhost:8080/myApp

I want to deploy it to

http://localhost

回答1:


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=/



回答2:


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




回答3:


To remove the port, use:

grails -Dserver.port=80 run-app


来源:https://stackoverflow.com/questions/5989910/how-to-remove-app-name-and-port-from-url-in-grails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!