LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-29-2012, 07:11 AM   #1
abhihebbar
LQ Newbie
 
Registered: Sep 2008
Location: India
Distribution: Ubuntu 12.10
Posts: 12

Rep: Reputation: 0
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.

Last edited by abhihebbar; 11-29-2012 at 07:19 AM.
 
Old 11-29-2012, 08:22 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

This could be a SELinux permissions problem. Disable it temporarily running
Code:
setenforce 0
and see if it works

Regards
 
Old 11-29-2012, 09:49 AM   #3
abhihebbar
LQ Newbie
 
Registered: Sep 2008
Location: India
Distribution: Ubuntu 12.10
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for that. But SELinux is disabled. I got the fallowing message when running that command.
Code:
setenforce: SELinux is disabled
 
Old 11-29-2012, 11:32 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by abhihebbar View Post
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/
 
Old 11-29-2012, 10:39 PM   #5
abhihebbar
LQ Newbie
 
Registered: Sep 2008
Location: India
Distribution: Ubuntu 12.10
Posts: 12

Original Poster
Rep: Reputation: 0
Smile

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.
 
  


Reply

Tags
apache



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache issue? glennbtn Linux - Software 2 05-04-2012 01:40 PM
Apache issue jmc1987 Linux - Server 8 11-14-2009 07:01 AM
ModProxy and VirtualHost Combination Issue - Apache 2 ddenton Linux - Server 2 04-02-2009 05:20 PM
Apache issue plk Linux - Server 2 04-14-2008 09:30 AM
Apache 2.2.3 issue. Galaxy_Stranger Linux - Server 4 09-12-2006 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration