LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-06-2008, 06:01 AM   #1
wolfipa
LQ Newbie
 
Registered: May 2004
Location: Austria
Distribution: Fedora Ubuntu OpenSuse
Posts: 26

Rep: Reputation: 15
redirecting to multiple hosts based on url


Hi

i need to redirect to multiple hosts/ports based on the entered url.

e.g.
Code:
redirect http://server1/a/ --> to http://server1:port1/
redirect http://server1/b/ --> to http://server1:port2/
redirect http://server1/c/ --> to http://server1:port3/
...
but without changing the actual url in the browser.

Note that the /a/ , /b/ , and so on isn't available on the remote server. I want to build some kind of management interface for multiple applications on one http server.

Is this possible? Or any other suggestions?

Thanks for any response in advance.
 
Old 08-06-2008, 08:04 AM   #2
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
Hi,

Do you mean redirect via Apache or by HTML?

Carl.
 
Old 08-06-2008, 09:19 AM   #3
wolfipa
LQ Newbie
 
Registered: May 2004
Location: Austria
Distribution: Fedora Ubuntu OpenSuse
Posts: 26

Original Poster
Rep: Reputation: 15
hi,

sorry, but forgot to mention. I want to use apache (version 2.0).
 
Old 08-06-2008, 09:36 AM   #4
carlmarshall
Member
 
Registered: Jan 2004
Location: North Yorkshire, UK
Distribution: Centos 5
Posts: 133

Rep: Reputation: 16
In that case, make sure you have the mod_alias module installed and use the redirect directive e.g.

Redirect [status] /a http://server1:port1/
Redirect [status] /b http://server1:port2/

etc

in your httpd.conf file.

The status is optional and will default to "temp", but can be "permanent".

Carl.
 
Old 08-11-2008, 09:24 AM   #5
wolfipa
LQ Newbie
 
Registered: May 2004
Location: Austria
Distribution: Fedora Ubuntu OpenSuse
Posts: 26

Original Poster
Rep: Reputation: 15
Hi,

sorry for late reply but I've tested using redirect and it's working not that way I wanted.

When I add the configuration item
Code:
redirect 302 /a http://server1:port1/
my browser changes the url to the above and tries to connect directly.

I want to have kind of proxy server in between so connections from outside are only going to apache, and based on the URL the content is retrieved from the redirected server.

is this possible?
 
  


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
Redirecting output to multiple locations? SirTristan Linux - Newbie 6 05-29-2008 03:52 PM
redirecting the output of pwd into konqueror as a url. using bash fiery_ice Linux - Newbie 5 04-05-2006 03:13 PM
URL redirecting in Apache Marq Linux - Software 4 01-03-2006 12:41 PM
Can I route web traffic to 2 different hosts based on URL under 1 IP Address? Marshalle Linux - Networking 5 05-14-2005 03:02 AM
Redirecting URL to another server wilcoNL Linux - Software 3 04-05-2004 07:00 AM

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

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