LinuxQuestions.org
Visit Jeremy's Blog.
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-31-2004, 04:01 PM   #1
baslemmens
LQ Newbie
 
Registered: Aug 2004
Location: Breda, Netherlands
Distribution: fedora & rh9
Posts: 16

Rep: Reputation: 0
redirect in Apache


Hello Boys and girls. Please help me out.

I want to do the following: on one machine i have running apache accesible to the internet.
Within my network I have a mailserver with webaccess. Both my external website and my internal webmail works fine.

Now comes the following I do not want to make my webmail accessible via the apache external website.
I have made a dns record pointing to external ip address (tested ok) and in httpd.conf I have made a virtual host and it's redirecting to internal machine's hostname.

Now this works fine from inside network but from internet it is looking for the internal address on the internet, this of course does not work.

Do you have any ideas on this?

Thanks Bas

This is my part of httpd.conf:
<VirtualHost *>
ServerName exchange.yy.com
ServerAdmin postmaster@yy.com

Redirect / http://hostname/exchange

</VirtualHost>

Last edited by baslemmens; 08-31-2004 at 04:09 PM.
 
Old 08-31-2004, 04:35 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
I dont know if you have php enabled, but for my part I would do an index.php file in the document root of exchange.yy.com like :
PHP Code:
header('Location: h t t p : / / '.$_SERVER['HTTP_HOST'].'/exchange'); 
€dit : I had to make spaces in http:// word to get code display without tags

Last edited by Cedrik; 08-31-2004 at 04:38 PM.
 
Old 08-31-2004, 05:17 PM   #3
littleking
Member
 
Registered: Jun 2003
Location: New Albany, OH
Posts: 190

Rep: Reputation: 30
is the hostname a valid hostname that is registered in dns? if not, then nobody from the internet will be able to see it.
 
Old 08-31-2004, 06:24 PM   #4
baslemmens
LQ Newbie
 
Registered: Aug 2004
Location: Breda, Netherlands
Distribution: fedora & rh9
Posts: 16

Original Poster
Rep: Reputation: 0
i thought it may be possible to let apache get the data from the internal network and present it to the internet.
With some kind of virtual host setting to do this for me.

The Internal webserver only has internal ip address and internal domain resolving.

bas
 
Old 08-31-2004, 07:01 PM   #5
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 17
If you're trying to do what I think you're trying to do, you could setup apache as a reverse proxy.


From the mod_proxy documentation ...
Quote:
A reverse proxy, by contrast, appears to the client just like an ordinary web server. No special configuration on the client is necessary. The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin.

Last edited by angrybeaver; 08-31-2004 at 09:16 PM.
 
Old 09-01-2004, 12:08 PM   #6
baslemmens
LQ Newbie
 
Registered: Aug 2004
Location: Breda, Netherlands
Distribution: fedora & rh9
Posts: 16

Original Poster
Rep: Reputation: 0
Hello Beaver,

Indeed what you're saying is very much alike what I had in mind.
Just from outside 1 machine availlable and redirecting requests to separate webservers and thus lowering risk of security breach.

Thanks, when I get home I go and check the apache.org website.

Thanks!

Bas
 
Old 09-02-2004, 01:07 PM   #7
baslemmens
LQ Newbie
 
Registered: Aug 2004
Location: Breda, Netherlands
Distribution: fedora & rh9
Posts: 16

Original Poster
Rep: Reputation: 0
For the ones who would like to know about Reverse Proxies, I found valuable information:

http://www.apacheweek.com/features/reverseproxies

Cheers Bas
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 VirtualHost Redirect Problem... SiLiCoN Linux - Networking 5 05-03-2005 09:41 AM
redirect traffic through apache kola Linux - Networking 7 12-11-2004 08:29 AM
apache redirect question twk Linux - Networking 2 10-23-2004 02:03 AM
How to redirect apache to tomcat? gepesz Linux - General 0 07-29-2004 10:16 PM
apache redirect? fibbi Linux - Software 7 01-30-2004 11:41 PM

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

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