LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Intranet networking (https://www.linuxquestions.org/questions/linux-newbie-8/intranet-networking-338662/)

NaX 06-30-2005 05:09 AM

Intranet routing or forwarding?
 
Hi all
I am quite new to Linux. I search the forums but I did not find any thing relating to my problem.

This is what I have to work with:

At work I setup a Slackware 10 web development box. All apps are the default versions that come with the distro. It is running Apache, PHP, mySQL and is being used as a SAMBA file server.

We are behind a FreeBSD Firewall / Router / proxy / mail server witch I have no control over. It is maintained by an outsourced company and we pay to make changes to the BSD box.

We have a windows 2003 IIS web server for the odd ASP site we might need to make and it is currently running our company’s website. It was original made in ASP. I will be converting it to php soon. It is also running our domain and DNS.

What I need to do:

What I have been asked to setup is some kind of routing or forwarding. All http requests from the external interface on the BSD box are being forwarded to the 2003 box at the moment. We now wanting to change that and make all the http requests to be forwarded to the slackware box and then from their be forwarded to the 2003 box or served directly form the slackware box depending on the url / domain name. This slackware box is also running our intranet.

If I had a spare box I would setup a dedicated box for this task but I don’t.

I have now idea where to start or what is needed to do this and if I am able to do so much on 1 Linux box. To start it will just have to forward 2 websites to the 2003 box and rest to be served directly from apache. Apache is only running off the default site and I think I would need to change this to include some virtual hosts.

Can any body point me in the right direction?

I was thinking Apache could request the requested page form the 2003 box then serve them to the browser. Acting as a middle man. And this could be set per a virtual host per a domain. Is this possible. I don’t want any thing to be cached on the Slackware box since the BSD box is already acting as a proxy.

Any help would be much appreciated.
Thanks

stefan_nicolau 06-30-2005 06:24 AM

use apache with mod_proxy and virtual hosts. Create two virtual hosts and put this in their configuration:
Code:

<Proxy *:80>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://win2003.box.com
ProxyPassReverse / http://win2003.box.com

Configure the other virtual hosts with the standard settings (document root, webmaster, log files, etc.) to serve the files from apache.

If your problem is a lack of computers, have a look at xen.

NaX 07-01-2005 05:40 AM

Got it working
 
Thanks I got it working. I had to install apache 2, could not get it working with 1.3

This is what I ended up with.
A little differnt because I am using IP address with ProxyPreserveHost On.

Code:

<VirtualHost IP-Address:*>
ProxyPreserveHost On

ProxyPass / http://IP-address/
ProxyPassReverse / http://IP-address/

ServerName domain-name
ServerAlias *.domain-name
</VirtualHost>

The only thing that you left out of your code was the last / for ProxyPass and ProxyPassReverse.

Thanks


All times are GMT -5. The time now is 05:14 AM.