LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-03-2011, 04:47 PM   #1
shaselai
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Rep: Reputation: 0
Problem with server 127.0.0.1:8080 access


I am trying to work with http-bind and have following virtual host:
<VirtualHost *>

ServerName openfire
DocumentRoot /usr/local/apache2/htdocs/jwchat-1.0

<Directory "/usr/local/apache2/htdocs/jwchat-1.0">
Options +MultiViews
</Directory>

AddDefaultCharset UTF-8
ProxyRequests On

ProxyPass /http-bind http://127.0.0.1:8080/http-bind/
ProxyPass http-bind/ http://127.0.0.1:8080/http-bind/
ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/
ErrorLog /usr/local/apache2/logs/jwchat_log
LogLevel warn
</VirtualHost>

When i go to "http://openfire/http-bind/" i get the "service unavailable" page and here are the logs:
From jwchat_log:
[Thu Mar 03 17:27:25 2011] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
[Thu Mar 03 17:27:25 2011] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)

From apache access.log:
12.34.567.89 - - [03/Mar/2011:17:27:25 -0500] "GET /http-bind/ HTTP/1.1" 503 323

Now i tried this on my windows VM and get:
windows:
[Thu Mar 03 17:30:33 2011] [error] (OS 10061)No connection could be made because the target machine actively refused it. : proxy: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
[Thu Mar 03 17:30:33 2011] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)

127.0.0.1 - - [03/Mar/2011:17:30:32 -0500] "POST /http-bind/ HTTP/1.1" 503 323

If i go directly to "localhost" i see the server page and when i try to connect (login) i get:


<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
<h1>Service Temporarily Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>

So basically it seems the http-bind for the conf is working in trying to connect but is getting blocked AND the server's functions is getting blocked too... I am using centos 5.5 and it has SE Linux on it. I tried to disable firewall and SE Linux (didn't restart) but still nothing..
I checked the iptables and it is:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 8080 -j ACCEPT
doesnt this mean it is being allowed?
i am really confused why this is happening..some help please!
thanks!
 
Old 03-04-2011, 12:39 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Hi,
Quote:
--snip
ProxyRequests On

ProxyPass /http-bind http://127.0.0.1:8080/http-bind/
ProxyPass http-bind/ http://127.0.0.1:8080/http-bind/
ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/
--snip
The above is not correct. Only the 3rd ProxyPass directive is right (as both URIs have a trailing slash).
I don't know how http-bind works, but if you want to use apache as a reversre proxy for it, you can try the following instead:
Code:
ProxyRequests Off
ProxyPreserveHost On

ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/
ProxyPassReverse /http-bind/ http://127.0.0.1:8080/http-bind/
And make sure that the server on localhost is running and listening on port 8080

Regards
 
Old 03-05-2011, 12:57 AM   #3
shaselai
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Original Poster
Rep: Reputation: 0
i see. sorry if it's a newb question but how do i make it sure that 8080 on localhost is on and listen mode? I think when i installed apache2 on windows i had the option of listening on 80 for "everyone" or 8080 for that user.... i also checked my linux port list and it seems 8080 not even on listening status (doesnt appear at all on list ports) so maybe i need to set it to listen and if yes how? thanks
 
Old 03-05-2011, 02:58 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
You can run:
Code:
 netstat -tanpl|grep 8080
If it's not listening, start the server that should listen on port 8080

Regards
 
Old 03-07-2011, 04:15 PM   #5
shaselai
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Original Poster
Rep: Reputation: 0
ok, the server is listening and i can access :8080 BUT there is a problem:
. the proxy pass "ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/" doesn't seem to work when i go to "http://openfire/http-bind/ BUT if i go to the proxypas location directly i can get there.
 
Old 03-07-2011, 05:12 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
the proxy pass "ProxyPass /http-bind/ http://127.0.0.1:8080/http-bind/" doesn't seem to work when i go to "http://openfire/http-bind/ BUT if i go to the proxypas location directly i can get there.
Say, is that http-bind software running on the same box as apache?
If it isn't then you should replace 127.0.0.1 with the actual IP of the box running http-bind.
 
Old 03-07-2011, 11:47 PM   #7
shaselai
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Original Poster
Rep: Reputation: 0
hey, the http-bind is from openfire and i am using jwchat with proxypass. so yes the http-bind is from same computer.
 
Old 03-08-2011, 03:17 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,170
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Hi,

As I've already told you I've never used that http-bind thing, but there is a similar thread here at LQ and another one on SF
Maybe you need to define the SITENAME variable as "openfire" (your server name) in config.js, so it allows the apache at localhost to connect to the backend server.

Regards
 
  


Reply



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
VNC server using port 8080 Ridzuan1990 Linux - Server 3 08-06-2009 02:59 AM
error in 127.0.0.1 port 2345 , access denied gr8zaher Linux - Newbie 3 05-07-2009 08:08 PM
error in 127.0.0.1 port 2345 , access denied gr8zaher Linux - Networking 2 05-07-2009 08:27 AM
access 8080 web server port through squid running on 8080 sunethj Linux - Networking 11 05-18-2007 02:38 AM
Port 8080 access kinchj Linux - Security 6 01-06-2004 10:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:58 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