0

In the Config.groovy file there is the setting:

grails.serverURL = "http://www.changeme.com"

Is there a way for a grails war file to be produced such that it can handle

    "http://www.site1.com"  and
    "http://www.site2.com" 

?

4

1 回答 1

0

根据 Ivar 的评论回复:

删除 grails.serverURL 并使用容器配置

这确实奏效了。我碰巧在运行 jetty 9。如果你也在运行,webapps.demo 目录中有一个示例 test.xml 文件。可以将其复制到 webapps 目录中,将其重命名为您正在使用的战争名称,例如 root.xml,然后在其中添加一些条目:

  • 设置您的战争文件的名称,例如 root.war
  • 填写 virtualHosts 区域。
于 2013-09-10T02:27:32.217 回答