Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd October 2011, 11:16
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
Default Sub-domain redirect to Virtual machine

Hi guys, (IP addresses aren't real)

I HAVE purchased the ISPConfig Manual already - still can't figure it out
What I need to do is this:

I have a Debian Server running ISPConfig 3 which works fine with my websites so far. What I want to do is host a sub domain on a virtual machine.

Currently my setup is
ISPConfig 3 server : 192.168.1.1/24 server1.example.com
Virtual Machine: 192.168.1.8/24 server2.example.com

If i put the ip address into the url with 192.168.1.8/test it shows the website i want, but if i put in www.example.com/test it comes back with a error.

I have added a sub-domain in ISPConfig
Host: server2
Domain: example.com
Redirect: R,L
Redirect path: http://server2.example.com/test/

I have a CNAME entry as
server2 192.168.1.8

What am I missing??? This has me stumped... Thanks in advance
Reply With Quote
Sponsored Links
  #2  
Old 23rd October 2011, 17:50
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Quote:
Originally Posted by sjswarts View Post
I have added a sub-domain in ISPConfig
Host: server2
Domain: example.com
Redirect: R,L
Redirect path: http://<font color="Red">server2</fo...mple.com/test/
You want to redirect the subdomain server2.example.com to server2.example.com? I think you have a loop there...
__________________
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
  #3  
Old 23rd October 2011, 18:35
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by falko View Post
You want to redirect the subdomain server2.example.com to server2.example.com? I think you have a loop there...
That could be ... what I need to know is how to achieve my goal.

I have www.example.com going to my normal website on server1.example.com which has for its IP 192.168.1.1/24 - this is working already.

Now I also want when people access a link or directly enter into the URL www.example.com/example that it redirects to my second server which has a hostname server2.example.com ip 192.168.1.8/24 and is also running apache

I am wondering how do I do this in ISPConfig 3 or is there a better way to achieve the same goal?

Thanks for your response

Steve
Reply With Quote
  #4  
Old 24th October 2011, 09:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Go to the Redirect tab of your website in ISPConfig and configure your redirect there.
__________________
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
  #5  
Old 24th October 2011, 10:04
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
Default

That would work if I had the server else where but I don't.

They are physically at the same address on the same internet connection coming from the same ADSL router - obviously I can't forward port 80 to both only one

This is the connection:

ADSL Router (1) ==port forward 80==> Debian Server1 hosts www.example.com

ADSL Router (1) ==NO PORT FORWARD===> Debian Server2 hosts www.example.com/example

Server1 192.168.1.1/24
Server2 192.168.1.8/24

How do I get Server1 to redirect a URL request asking for www.example.com/example to server2 on the same network?

Thanks steve
Reply With Quote
  #6  
Old 24th October 2011, 10:24
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,395
Thanks: 833
Thanked 5,490 Times in 4,322 Posts
Default

You can do this e.g. by configuring a reverse proxy with apache mod_proxy.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 24th October 2011, 10:29
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
Default

Thats what I have found out so far from google but I'm wondering how I can do that with ISPConfig installed... Where do i put it and what do I put in...

If you could please direct me to a good site that would be fantastic

Cheers,
Steve
Reply With Quote
  #8  
Old 24th October 2011, 10:49
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,395
Thanks: 833
Thanked 5,490 Times in 4,322 Posts
Default

I dont have a link to a site at hand. But in general, it should be enough to add the directives for the reverse proxy in the apache directives field of the website in ispconfig.

Before you do that, make sure that the apache reverse proxy modules are installed and loaded on your server.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 24th October 2011, 12:27
sjswarts sjswarts is offline
Senior Member
 
Join Date: May 2011
Location: Australia
Posts: 135
Thanks: 17
Thanked 5 Times in 5 Posts
Default

Ok Till thank you for your comment seems like i'm in the right direction...

this is a extract from my vhost file on the website that I want to run apache reverse proxy...
================================================== ====
ProxyRequests Off
ProxyPreserveHost On

<Proxy 192.168.1.1:80>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /example http://server2.example.com/
ProxyPassReverse /example http://server2.example.com/
================================================== ====
i have also added a CNAME in dns:

server2.example.com.
192.168.1.8

It comes up with a error not found which is different than before so I am on the right track "hope"

What am I doing wrong?

Thanks
steve
Reply With Quote
  #10  
Old 24th October 2011, 12:31
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,395
Thanks: 833
Thanked 5,490 Times in 4,322 Posts
 
Default

The question is if there is a problem with the proxy or the target page. Lets first test the target page:

Do you get the correct page when you open the URL http://server2.example.com/ inside your local network in a browser?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
Postfix: can send emails outside, none received daseagle Server Operation 9 11th October 2011 12:03
Postfix not forwarding for some domains flappy Installation/Configuration 3 21st November 2010 17:57
RoundCube Sends but will not receive. happz Installation/Configuration 33 17th April 2010 21:55
421 Unexpected failure Lizard King Installation/Configuration 20 7th July 2009 20:43
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 09:40


All times are GMT +2. The time now is 08:50.


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