Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Grails listen on external IP address

I started a Grails app listening to the default port 8080, as well as running grails as root to listen at port 80:

#grails -Dserver.port=80 run-app

This works perfectly well on localhost, but when I access it from an external IP address, it just fails to work. Just to be sure, I have Apache running on the same server and I can access it perfectly fine over the Internet.

Is there some configuration option I am missing here to ask Grails to listen on all IP addresses?

I even tried this but to no avail:

#grails -Dserver.host=0.0.0.0 -Dserver.port=80 run-app

I am using Grails 1.4.0M1 on Ubuntu 10.04 on an EC2 instance.

Thanks in advance.

Hanxue

like image 986
Hanxue Avatar asked Jul 08 '11 11:07

Hanxue


1 Answers

If you really want to run it with run-app, the enter your servers IP address in your command-line, like this:

#grails -Dserver.host=xx.xx.xx.xx -Dserver.port=80 run-app

But you will probably find that you get a conflict with your Apache server running on the same IP.

I think you should look into using mod_proxy and mod_proxy_apj to "hide" your grails server beghind your Apache server

like image 124
sbglasius Avatar answered Oct 14 '22 03:10

sbglasius