LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-11-2011, 02:13 AM   #1
NaveenM
LQ Newbie
 
Registered: Aug 2011
Posts: 2

Rep: Reputation: Disabled
How to forward requests coming to a linux port


Hello everyone.

*Am trying to configure on machine “MyServer.net” apache on port 8586.
*Two applications run on same machine on different ports Jenkins on 8081 and Hudson on 8080.

*Request coming to 8586 port should redirect to either 8080 or 8081 on one condition.
*The request from client machine coming to MyServernet:8586 looks something like this “MyServer.net/job/<JOBNAME>/build?token=TOKEN”.

Condition
If <JOBNAME> is “naveen” apache should redirect to 8081.
If <JOBNAME> is not “naveenn” apache should redirect to 8080.

I want the request to go like this

Client Machine <---> Apaache Port <--->(Jenkins/Hudson)

<---> = Send and recieve.



Here is the httpd.conf which I configured.


### ********** Test Configuration Start *************** ###

Listen 8586

ProxyPass /job/naveen/* http://Myserver.net:8081/
ProxyPassReverse /job/naveen/* http://MyServer.net:8081/

<ProxyMatch "^http://Myserver.net:8586/job/naveen/*">
Allow from All
Order Allow,Deny
</ProxyMatch>

ProxyPass /job/[!naveen]/* http://Myserver.net:8080/
ProxyPassReverse /job/[!naveen]/* http://MyServer.net:8080/

<ProxyMatch "^http://Myserver.net:8586/job/[!naveen]/*">
Allow from All
Order Allow,Deny
</ProxyMatch>

### *********** Configuration End ************** ###


Any inputs/hints/pointers/suggestions are most welcome. I have to configure this.

Its not working, the error log says the
[Wed Aug 10 17:31:32 2011] [error] [client <Ip Address>] File does not exist: /fast/apps/apache/Modified_Apache/htdocs/crumbIssuer


This path "/fast/apps/apache/Modified_Apache/" is the path configured in "MyServer.net" where am running the apache.

So whats wrong in here. Can anyone help me out please.
 
Old 09-19-2011, 04:17 PM   #2
cheesus
Member
 
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 186

Rep: Reputation: 25
Post

I'd say it doesn't look so bad, except that you don't use "*" with ProxyPass,
and maybe need to check whether you want slashes or not:
http://httpd.apache.org/docs/current...html#proxypass
Cheers, Tom.
 
  


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
Forward incoming requests to another server ajaimes Linux - Networking 4 06-04-2007 01:43 PM
forward all HTTP requests to the proxy cccc Linux - Networking 2 10-01-2006 06:42 PM
Forward FTP Requests mitt Linux - Networking 7 04-08-2005 10:11 AM
forward all dns requests to one page Moszer Linux - Networking 4 05-25-2004 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:34 PM.

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