Apache 2 with Mod Proxy Connecting to Grails Run-app
daniel Thu, 02/24/2011 - 4:26pm
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