M_Lude
M_Lude

Reputation: 365

How to set a Loopback nodeJS backend on Apache HTTP server running on CentOS

I've moved the backend (nodeJs+Loopback) of my application on a server CentOS. When I run it, it's listening on "localhost:3000". If I type "curl http://localhost:3000" while I'm on the server's terminal I get a response. When I try to call the application from remote, I use the real IP address instead of localhost, but it doesn't work.

The error is:

[proxy:error] (13)Permission denied:HTTP: attempt to connect to 127.0.0.1:3000(localhost) failed

Do I need to setup some configuration?

Thank you

Upvotes: 0

Views: 350

Answers (1)

GoinOff
GoinOff

Reputation: 1802

Have you tried # setsebool -P httpd_can_network_connect 1 ??

Check out the bottom of this link:

https://wiki.apache.org/httpd/13PermissionDenied

Upvotes: 2

Related Questions