Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to proxy a subdomain to another computer on my LAN, under OS X Server 4.1?

Visualize this outcome:

  1. site1.example.com
    -> my single public IP -> Port forwarding 80 and 443 to LAN
    192.168.1.10
    Mac running OS X Server 4.1 on OS X 10.10 Yosemite
  2. site2.example.com
    -> my single public IP -> LAN
    192.168.1.10
    -> reverse proxy? -> :80 and :443 on LAN
    192.168.1.15

This is on a network where I have no option of adding another public IP.

#1 is already up and running fine.

#2 is the hard part, mainly because I'm running OS X Server (4.1, Yosemite) on #1, and the proxy setup does not seem to be the relatively straight-forward Apache one, e.g.:

<VirtualHost *:80 *:443>

     ServerName site2.example.com


     ProxyRequests off

     ProxyPass / http://192.168.1.15/

     ProxyPassReverse / http://192.168.1.15/

</VirtualHost>

That is, OS X Server has the Apache config files in odd places, and my understanding is that it likes to overwrite them with new changes made in the GUI, so I'm trying to figure out the “right” way to do this on OS X Server.

A friend of mine suggested there might be a way to do it with OS X Server's

webappctl
command and writing an appropriate
webapp.plist
, though the Work with web apps section of the OS X Server docs contains almost no detail. Looking at the
man
pages Apple suggests and their example .plist file, it seems to me that their idea of a “web app” really wants to be attached to a directory (i.e., site1.example.com/webapp), and not as a subdomain (as in #2, above). Perhaps I just haven't quite figured out the .plist formatting yet?

What is the “right” way to do this on OS X Server?

Posted on Jun 27, 2015 11:40 AM

Reply
1 reply

How to proxy a subdomain to another computer on my LAN, under OS X Server 4.1?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.