如何部署没有上下文路径的Grails应用程序? [英] How to deploy Grails app without context path?
本文介绍了如何部署没有上下文路径的Grails应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
不知道我是否在这里正确使用术语上下文路径,但是当前当我在本地运行我的Grails(2.3.6)应用程序时,它出现在 http:// localhost: 8080 / MyApp的
。最终,我希望它被部署到实际的应用服务器上,位于 http://myapp.com
。
<这可能吗?如果不是,为什么?如果是这样,怎么做?
解决方案
在config.groovy中,只需设置:
grails.app.context =/
另外,您应该更新config.groovy中的环境:
环境{
development {
grails.serverURL =http:// localhost:8080
}
生产{
grails.serverURL =http://myapp.com
}
}
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?
解决方案
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"
}
}
这篇关于如何部署没有上下文路径的Grails应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文