LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache ModProxy issue (https://www.linuxquestions.org/questions/linux-software-2/apache-modproxy-issue-4175439307/)

abhihebbar 11-29-2012 07:11 AM

Apache ModProxy issue
 
Hi,

I am trying to configure apache to act as a reverse proxy for my nodejs application on a centos machine.

However, I am receiving an error in the error log saying
Code:

[Thu Nov 29 18:39:26 2012] [error] proxy: HTTP: disabled connection for (localhost)
My Virtual host configuration.
Code:

<VirtualHost *:80>
    ServerAdmin xxx@xxx.xx
    ServerName xxx.com

    ProxyRequests off

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    <Location />
        ProxyPass http://localhost:3001/
        ProxyPassReverse http://localhost:3001/
    </Location>
</VirtualHost>

Please help.

bathory 11-29-2012 08:22 AM

Hi,

This could be a SELinux permissions problem. Disable it temporarily running
Code:

setenforce 0
and see if it works

Regards

abhihebbar 11-29-2012 09:49 AM

Thanks for that. But SELinux is disabled. I got the fallowing message when running that command.
Code:

setenforce: SELinux is disabled

bathory 11-29-2012 11:32 AM

Quote:

Originally Posted by abhihebbar (Post 4839609)
Thanks for that. But SELinux is disabled. I got the fallowing message when running that command.
Code:

setenforce: SELinux is disabled

Are you sure that nodejs is running and listening on 127.0.0.1 and port 3001?
Also better ditch the <Location ..> and use just:
Code:

ProxyPass / http://localhost:3001/
ProxyPassReverse / http://localhost:3001/


abhihebbar 11-29-2012 10:39 PM

Thanks, That solved.

I had started apache prior to the nodejs app, assuming every request would be proxied at that instance.

However, this time I started the nodejs app first and then restarted apache, and it worked.

Thanks for your help.


All times are GMT -5. The time now is 01:56 AM.