Home grails.serverURL with Nginx doesn't work properly
Reply: 0

grails.serverURL with Nginx doesn't work properly

user1094
1#
user1094 Published in June 18, 2018, 7:48 am

I have my Grails 2.1 Application running within a Tomcat 7.x container. It's called ROOT.war. Nginx takes care for routing. Both components are on their own Ubuntu 12.4 servers.

The grails.serverURL in Config.groovy is set to the prod Domain www.myproddomain.com. So far, everything works perfect.

If I now want to test the Grails App before I activate the tomcat in Nginx, so I tried to use the internal URL from the server such as internalipofserver:8080. This works, but since the grails.serverURL is set to www.myproddomain.com, I cannot click around without beeing redirected to www.myproddomain.com which makes no sense to test then.

If I now leave grails.serverURL away, the preview on internalipofserver:8080 works fine, but as soon as I activate this tomcat in nginx to be reachable under www.myproddomain.com, certain resources will be pulled from internaliofserver:8080.

It seems to me as of tomcat would kind of store the first address that the site was called and then use that url.

Can you advise? Thank you. Best Sullivan

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.34811 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO