Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


pstar008

352 posts

Ultimate Geek


#62532 9-Jun-2010 12:16
Send private message

Hi, I've setup apache servers for personal projects using my home file server and desktop PC. Now I ended up
need find a way for them to share port 80 from my single IP address.

I think the answer is reverse proxy mod in Apache? Any start point for setting up one in Debian server?

Create new topic
chrisjunkie
407 posts

Ultimate Geek


  #339790 9-Jun-2010 13:57
Send private message

Something like the following. Substitute IP1 as the IP address (internally) of the PC that is going to be doing the proxy'ing. Replace IP2 with the IP address of the other PC's IP address. DomainName of PC2 should be straight forward :) (note that this will not work going straight to an IP address as this relies on NameBased Forwarding. Get a dyndns or no-ip domain if you need to - that is another topic)

<VirtualHost IP1:80>
        ServerName pc2.domainname.co.nz
        DocumentRoot /var/www/
        ProxyRequests Off

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

        ProxyPass / http://IP2:80/
        ProxyPassReverse / http://IP2:80/
</VirtualHost>

Hope that helps! I use many many of these in my vhosts file. You can place in apache.conf if you don't have a vhosts.conf (or similar)

Can actually use these to get past firewall issues too as the :80 can be changed to a non-standard port. E.g your web monitoring software runs on 1154 so you just change to IP2:1154 and off you go!

Please ask if you have more questions!
Cheers
Chris

JAMMAN2110
871 posts

Ultimate Geek

Trusted

  #339794 9-Jun-2010 14:03
Send private message

Why not combine them as a Virtual Host for each project on the one server?

 
 
 
 


pstar008

352 posts

Ultimate Geek


  #340456 10-Jun-2010 22:31
Send private message

Hi Chris, thank you for the help, I finally get a chance to test it tonight, and it works!

I am on a Debian Lenny, so the proxy setting is on mods-available/proxy.conf. And as I am using named-based virtual host on PC2 I changed IP2 to server2's name.

Thanks again for the great helps.

pstar008

352 posts

Ultimate Geek


  #340576 11-Jun-2010 11:53
Send private message

@Jamman2010
Yes, put them all into a machine with vhost will certainly solve me problem, but I guess I am
just been lazy and think that there must be a way of doing that.

k1wi
476 posts

Ultimate Geek


  #340578 11-Jun-2010 11:58
Send private message

I have a couple of homedns configured using vhosts, very straightforward :)

Though I did manage to borge it one day when I removed the first line of the file thinking it was just superfluous! Turns out it was the line that tells apache that there is more than one vhost :o

JAMMAN2110
871 posts

Ultimate Geek

Trusted

  #340586 11-Jun-2010 12:14
Send private message

pstar008: @Jamman2010
Yes, put them all into a machine with vhost will certainly solve me problem, but I guess I am
just been lazy and think that there must be a way of doing that.


Don't get me wrong, I use vhosts and mod_proxy all the time. But given that its at home there doesn't seem to be much point..

<VirtualHost *:80>
 DocumentRoot /var/www/site1/www
 ServerName blah.com
 ServerAlias www.blah.com
</VirtualHost>

Minimalist but it works ;)

pstar008

352 posts

Ultimate Geek


  #341451 14-Jun-2010 11:26
Send private message

Hi Jamman2110

My question is how to have two servers serve http request to one IP address and one port, but I failed to see how ServerAlias going to solve that?

Create new topic





News »

Nanoleaf enhances lighting line with launch of Triangles and Mini Triangles
Posted 17-Oct-2020 20:18


Synology unveils DS16211+
Posted 17-Oct-2020 20:12


Ingram Micro introduces FootfallCam to New Zealand channel
Posted 17-Oct-2020 20:06


Dropbox adopts Virtual First working policy
Posted 17-Oct-2020 19:47


OPPO announces Reno4 Series 5G line-up in NZ
Posted 16-Oct-2020 08:52


Microsoft Highway to a Hundred expands to Asia Pacific
Posted 14-Oct-2020 09:34


Spark turns on 5G in Auckland
Posted 14-Oct-2020 09:29


AMD Launches AMD Ryzen 5000 Series Desktop Processors
Posted 9-Oct-2020 10:13


Teletrac Navman launches integrated multi-camera solution for transport and logistics industry
Posted 8-Oct-2020 10:57


Farmside hits 10,000 RBI customers
Posted 7-Oct-2020 15:32


NordVPN starts deploying colocated servers
Posted 7-Oct-2020 09:00


Google introduces Nest Wifi routers in New Zealand
Posted 7-Oct-2020 05:00


Orcon to bundle Google Nest Wifi router with new accounts
Posted 7-Oct-2020 05:00


Epay and Centrapay partner to create digital gift cards
Posted 2-Oct-2020 17:34


Inseego launches 5G MiFi M2000 mobile hotspot
Posted 2-Oct-2020 14:53









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.