I need my Grails app at http://myserver.com/app/ to hit a PHP script on the same server. I’m using groovyx.net.http.HTTPBuilder to make the request, which works if the script is on another server. But if I move the script to http://myserver.com/php/script.php, I get
java.net.ConnectException
Message
Connection refused
The script is working normally in a web browser at http://myserver.com/php/script.php
How can I get Grails to make the request?
The server refused an HTTP request from & to itself using the public URL. The request works as intended if made using the server name ‘localhost’.