问题
Not sure if I'm using the term "context path" correctly here, but currently when I run my Grails (2.3.6) app locally, it comes up at http://localhost:8080/myapp
. Ultimately, I'd like it to be deployed to an actual app server at http://myapp.com
.
Is this possible? If not, why? If so, how?
回答1:
In config.groovy, just set:
grails.app.context = "/"
Also, you should probably update your environments in config.groovy as well:
environments {
development {
grails.serverURL = "http://localhost:8080"
}
production {
grails.serverURL = "http://myapp.com"
}
}
来源:https://stackoverflow.com/questions/23812063/how-to-deploy-grails-app-without-context-path