BowerStudios.com

  • My Lab
  • Family
  • Friends
  • Professional
  • About
Home

Apache 2 with Mod Proxy Connecting to Grails Run-app

daniel —Thu, 02/24/2011 - 4:26pm

  • Groovy

So, you should and WILL ONLY do this in dev.

Add one of these to blocks to your virtualhost:

<VirtualHost *:80>
ProxyPass /myapp/ http://127.0.0.1:8080/myapp/
ProxyPassReverse /myapp/ http://127.0.0.1:8080/myapp/
....

or:
<Location /myapp>
ProxyPass http://127.0.0.1:8080/myapp
</Location>

In your app's config file, modify the following section with your path:
environments {
development {
grails.serverURL = "http://YOUR_IP_ADDRESS_OR_DOMAIN_GOES_HERE/${appName}"
}
}

Start up your app:
grails run-app

Then restart Apache:
sudo apachectl restart

Now browse to your ip:
http://127.0.0.1/myapp/

If you open up a port on your firewall, you can use your outside ip / domain name

  • Log in to post comments

Navigation

  • Search
  • Recent content
  • Contact Me
  • Mail
  • Pass Hasher
  • Bower Studios Admin

Quotes

daniel —Mon, 02/26/2007 - 12:19pm

Hide not your talents, they for use were made. What's a sun-dial in the shade?

—

Benjamin Franklin

  • Log in to post comments
  • daniel's quotes

Popular content

Last viewed:

  • PLEAC Groovy Cookbook
  • Work
  • Common Directory Layouts of a Java Project
  • Using SSL with an IP address instead of DNS
  • Creating an External configuration file for Logback in a Webapp (.war file)

Copyright 2022 Daniel Bower
  • My Lab
  • Family
  • Friends
  • Professional
  • About