#1  
Old 21st July 2008, 16:11
kherio kherio is offline
Junior Member
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Redirect Web Server

I have 2 web servers on the lan and one of them has no internet.
I would like to be able to access to the lan web server from the internet so i must to redirect a web folder ( /var/www/mail/) from the one which has internet to the other in the lan and which has the webmail server.

btw, I use apache2 on a Debian etch

Is that possible?

Thx in advance

Last edited by kherio; 21st July 2008 at 16:14.
Reply With Quote
Sponsored Links
  #2  
Old 21st July 2008, 17:58
chipsafts chipsafts is offline
Senior Member
 
Join Date: Nov 2007
Posts: 184
Thanks: 2
Thanked 6 Times in 6 Posts
Default

you can try an NFS share/mount , setup a virtual site and see how it goes.
Reply With Quote
  #3  
Old 22nd July 2008, 15:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

You can also use the reverse proxy feature of Apache. These two tutorials might give you the idea:
http://www.howtoforge.com/apache_rev...roxy_ispconfig
http://www.howtoforge.com/load_balan...proxy_balancer
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 22nd July 2008, 18:25
kherio kherio is offline
Junior Member
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's a good idea but i'm not using ispconfig and no balancer
They are 2 diferent servers offering diferent services.

Here is my idea:
http://mypublicdomain/ -> Goes to the main server
http://mypublicdomain/mail -> Must go to a server in the LAN.

That's why im asking to create a virtual server but i have no clue. Is there any good tutorial or a howto?

Thx
Reply With Quote
  #5  
Old 23rd July 2008, 00:28
martien martien is offline
Junior Member
 
Join Date: Oct 2007
Posts: 26
Thanks: 2
Thanked 2 Times in 2 Posts
Default

Use proxypass like this:
Code:
ProxyPass /mail/ http://192.168.1.103:80/
ProxyPassReserve /mail/ http://192.168.1.103:80/
Just change 192.168.1.103 with your second server ip. You also can put this into a VirtualHost.
Reply With Quote
  #6  
Old 23rd July 2008, 11:55
kherio kherio is offline
Junior Member
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi all,

I already did it. This is my mail VirtualHost file in the sites-enabled folder:

<VirtualHost *>

DocumentRoot "/var/www/mail"
ServerName server2.server.com
ServerAdmin support@mycompany.com
DirectoryIndex index.html index.php

RewriteEngine On
RewriteRule ^/$ /mail [L,R]

ProxyRequests On
ProxyPreserveHost On
ProxyVia full

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /mail/ http://172.18.8.2:80/
ProxyPassReverse /mail/ http://172.18.8.2:80/

</VirtualHost>

Also I created the mail folder under /var/www but I suppose I must create the index.html or php file to redirect all the calls from that directory to the mail server. Does anybody tell me what to type in that file?

Im sorry but i'm newbie in these cases.

Thx
Reply With Quote
  #7  
Old 26th August 2008, 09:22
kherio kherio is offline
Junior Member
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Im sorry but it doesn't work. im a little fool

May I create the mail folder on the Internet Server? Or it doesn't matter?

Can anybody tell me all the lines must I put on the sites-enabled folder?

Thx in advance
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php Apps email not going through palkat General 8 21st September 2011 06:35
Web server installation kkhaled Server Operation 3 22nd May 2008 00:56
Email Clients cannot send mail iverson0881 Installation/Configuration 3 8th May 2008 09:34
Administrator receive empty mail ??? Stanev General 16 7th April 2006 21:56
Email - Ueb-Miau mazhar Installation/Configuration 5 21st December 2005 11:01


All times are GMT +2. The time now is 16:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.