LinuxQuestions.org
Help answer threads with 0 replies.
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 09-01-2012, 03:25 AM   #1
mazzse
LQ Newbie
 
Registered: Aug 2012
Location: Stockholm, Sweden
Distribution: Debian
Posts: 7

Rep: Reputation: Disabled
How do I fix two webservers(diffrent boxes) under same external ip?


Hi Guys!

I have for a couple of years been running a Debian webserver at my home. With a pleaseness of 100%. I am really so satisfied.
And now this machin is going to be replaced, and under this replaceing time Iam going to have both accesible from outside Internet.

So I need some help how to conf the first webserver to pass on the traffic to the second one. (with first I mean, the one who is forwarded port 80 in my firewall/router to) With second I mean the one who is going to be the new one.
I have figured out that I will need to conf /etc/apache2/sites-avaiable/default vith virtualhost and ProxyPass, right?
But I dont find an tut when I google, and others exaples only shows www.abc.com, 123.abc.com, 456.abc.com etc to the same machine. But it does not covers to another machine.

What I want to do is:
Config so that I can run owncloud.mydomain.com to another fysical server than the one that is exposed to internet today.

Can some friendly soul out there (here ) pls help me?

Best Regards
Mats

Last edited by mazzse; 09-01-2012 at 03:26 AM.
 
Old 09-01-2012, 08:27 PM   #2
barghota
Member
 
Registered: Jul 2003
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Debian, FreeBSD
Posts: 94

Rep: Reputation: 38
First, you need to check apache's virtual hosts Virtual Hosts specifivally Name-based hosts on more than one IP address and Using Virtual_host and mod_proxy together.

This URL provides a good information as well Using Apache with virtual hosts and mod_proxy

Basically, you will need something like;

Quote:
<VirtualHost *>
ServerName owncloud.mydomain.com

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

ProxyPass / http://internal-owncloud.mydomain.com
ProxyPassReverse / http://internal-owncloud.mydomain.com
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
Also check /etc/apache2/mods-available/proxy.conf.
 
1 members found this post helpful.
Old 09-02-2012, 06:23 AM   #3
mazzse
LQ Newbie
 
Registered: Aug 2012
Location: Stockholm, Sweden
Distribution: Debian
Posts: 7

Original Poster
Rep: Reputation: Disabled
Talking

Thank you for your help, it helped me the right way.
So I got it working now.

Tank you once again!

 
Old 09-04-2012, 05:25 AM   #4
barghota
Member
 
Registered: Jul 2003
Location: Cairo, Egypt
Distribution: CentOS, RHEL, Debian, FreeBSD
Posts: 94

Rep: Reputation: 38
you will find

'Did you find this post helpful? Yes'

Click on yes
 
Old 09-14-2012, 08:20 AM   #5
mazzse
LQ Newbie
 
Registered: Aug 2012
Location: Stockholm, Sweden
Distribution: Debian
Posts: 7

Original Poster
Rep: Reputation: Disabled
Smile

Now I have found another problem... (just because I expand my system... :P )

I just bought a USB-RJ12 thing that you can plug in dallas temperature sond in, to measure for example temperature (even called 1-wire system). Now I have tried to put this to its own adress like: temp.mydomain.com
I cant get this to work together with owncloud.mydomain.com, but only with temp.mydomain.com or owncloud.mydomain.com running.
Seems to be a problem when I activate two subdomains.
But if I set it up with owncloud.mydomain.com/temp or with temp.mydomain.com/owncloud or servername.mydomain.com/temp and servername.

But unfortunately I would have got in to this trouble soner-or-later bacause my plan is to move al the diffrent serverapplications to the "new" server.

See the Schematic picture that I have attached, for a more detaled explanation of how I have planed this to action.

All this wouldnt be a trouble if I just could do this config for a couple of days instantly, but that is the major problem, I cant. Just need to have this services up-and-runnign.

Please help me further on!
Attached Files
File Type: pdf Visio-Serverdomain-planen.pdf (79.8 KB, 15 views)
 
  


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
Multiple webservers on port 80 behind 1 external IP - possible ? Gelanin Linux - Newbie 3 02-19-2012 09:24 AM
How to fix IP address for 2 Linux boxes at the router level RT31P2 rajeshsfo Linux - Hardware 1 08-08-2006 09:36 PM
How to assign diffrent ip/hostnames to diffrent services koppaspider Linux - General 1 02-10-2006 09:03 PM
A quick question about ports & internal/external networks for webservers... jacksonscottsly Linux - Networking 2 07-10-2005 09:35 PM

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

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