【问题标题】:Grails 3 Error loading CSS when deploying to apache部署到 apache 时 Grails 3 加载 CSS 时出错
【发布时间】:2016-06-08 21:57:12
【问题描述】:

朋友

当使用 apache 和 tomcat 将 grails 3.1.4 应用程序部署到服务器时(apache root / 正在重定向到 tomcat 8080 中的 grails 应用程序),“asset:stylesheet”仍在生成指向已部署应用程序的链接(“@ 987654321@´),而不是根 (´http://....com/assets/application-519a.css´)。

当然,“serverURL”有一个有效值

httpd.conf 有以下代码块

<VirtualHost *:80>
    ServerName ....com 
    ServerAlias *.....com 
    ProxyRequests off
    ProxyPass / http://localhost:8080/og/
    ProxyPassReverse / http://localhost:8080/og/
</VirtualHost>

不知道我做错了什么,欢迎任何帮助,并提前感谢!

胡安

【问题讨论】:

  • 我已经尝试过休闲 documentation 但它不起作用
  • 还有this 。 . .不工作

标签: apache tomcat7 web-deployment grails-3.1


【解决方案1】:

修好了!

configuration.yml 中,propper assets url 配置为:

    . . .
    production:
        grails:
            assets:
                url: "http://....com/assets/"
        dataSource:
            dbCreate: update
            . . .

更多information

【讨论】:

  • 或者,'url: "assets/"'
猜你喜欢
  • 2018-02-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-10-15
  • 2022-12-12
  • 1970-01-01
  • 2016-02-26
  • 2023-03-20
相关资源
最近更新 更多