如何在没有上下文路径的情况下部署Grails应用程序?

如何在没有上下文路径的情况下部署Grails应用程序?,grails,web-applications,contextpath,Grails,Web Applications,Contextpath,不确定我在这里是否正确使用了术语“上下文路径”,但当前当我在本地运行Grails(2.3.6)应用程序时,它出现在http://localhost:8080/myapp。最终,我希望它部署到http://myapp.com 这可能吗?若否,原因为何?如果是,怎么做?在config.groovy中,只需设置: grails.app.context = "/" 此外,您可能还应该在config.groovy中更新您的环境: environments { development {

不确定我在这里是否正确使用了术语“上下文路径”,但当前当我在本地运行Grails(2.3.6)应用程序时,它出现在
http://localhost:8080/myapp
。最终,我希望它部署到
http://myapp.com


这可能吗?若否,原因为何?如果是,怎么做?

在config.groovy中,只需设置:

grails.app.context = "/"
此外,您可能还应该在config.groovy中更新您的环境:

environments {
    development {
        grails.serverURL = "http://localhost:8080"
    }
    production {
        grails.serverURL = "http://myapp.com"
    }
}

在config.groovy中,只需设置:

grails.app.context = "/"
此外,您可能还应该在config.groovy中更新您的环境:

environments {
    development {
        grails.serverURL = "http://localhost:8080"
    }
    production {
        grails.serverURL = "http://myapp.com"
    }
}