1 Reply Latest reply on May 15, 2014 3:52 PM by JohnBurwell

    Need to host company website and WebDirect on the same network



      Need to host company website and WebDirect on the same network

      Your post

           Hello and thank you for reading.

           I have installed FMS13 on a new Mac Mini running 10.9.2 with Server installed and while I think that it is totally crazy, I understand and accept that it is going to take over all web services on this machine.  I have therefore moved our company website and various other services over to a separate machine so FMS13 is exclusively running on its own machine.

           Everything is running fine except I am unable to figure out how to properly configure my network to direct www.example.com to the machine running the company website, and fm.example.com to the machine running FMS13.

           The other computer is another Mac Mini running 10.9.2 with Server installed.

           I can successfully forward port 443 and use https, but I know there is a way to do this with both sites using port 80.

           Thanks in advance for any advice.

        • 1. Re: Need to host company website and WebDirect on the same network

               You won't be able to do this with simple port forwarding in your router. When www.company.com and fm.company.com both resolve to the same IP address in DNS, there's no way for a router to distinguish the requests so that the router forwards to the right internal server. All the router knows about is IP addresses and port numbers, so a request for fm.company.com looks just like a request for www.company.com.

               If you have more than one public static IP address, you may be able to configure your router for 1:1 NAT, so that one of your static IPs translates to your web server, and another of your static IPs translates to your FM server. You'll need multiple static IPs from your ISP, however, and a router that supports 1:1 NAT. 

               If you only have one static IP address, or if you're using some kind of dynamic DNS service, you might be able to accomplish what you want by configuring your second web server as what's called a Reverse Proxy. In that configuration, your new web server would have one virtual host for 'www.company.com', handling requests as normal. Then you'd have another virtual host on the same server, responding to 'fm.company.com', configured as a reverse proxy for whatever internal IP address your FM server has. You'd forward all incoming traffic to the new web server, and it would either handle a request for "www" itself, or forward a request for "fm" to your FM server.

               Configuring Apache for that is simple, though it can be tricky when dealing with reverse proxies. I have no way of knowing what your server configuration is like, so I couldn't give you specific advice. But let's say your FM server has an internal IP address of The Apache config file for your proxy virtual server would probably look something like this:

          <VirtualHost *:80>
            ServerName fm.company.com
            ProxyPass /
            ProxyPassReverse /

               The traffic would then come through your router, to the new web server, then over to your FM server, then back to your web server and back out through the router. All the magic happens on your internal network, on your new web server.

               If you're using SSL, things are slightly trickier, but still feasible.