agoraphonics wrote:
Thanks for the response, but I'm not running the server built into OS X (personal web sharing) - I'm running OS X Server http://www.apple.com/osx/server/
It can supposedly configure virtual hosts - it's just not working for me.
and
JaimeMagiera wrote:
Have you tried accessing the second site just by root domain, not with the "www"? I'm a long time OS X Server user. Yes, it supports multiple vhosts. However, I just started moving sites to 10.11 last night and noticed that ServerAlias ("Additional Domains") is not working properly. When I add the root domain for "Domain Name", and then "www" for the "Additional Domains", I'm forwarded to the Wiki when I attempt "www.domain.com". If I create a second website entry specifically for "www.domain.com", it works. That implies my DNS, etc. is working correctly and that something is broken with ServerAlias. It most certainly used to work in previous version of OS X Server.
Nothing is broken. Virtual hosts work on OS X El Capitan with Server 5.0.15 (build15S4033). DNS must be configured correctly, taking in account that with Open Directory and Profile Manager running, Apple has really clamped down on the port settings for server. It takes ownership of a list of ports on all available interfaces. If you do need the profile manager, wiki etc running, the lower numbered IP4 interface should be leaved for the default server. The higher numbered should be your virtual hosts (websites) You can create these 'new' interfaces in Network settings. If you are not sure how to, ask for instructions.
It is necessary to edit the virtual host ports which are in:
/Library/Server/Web/Config/Proxy/apache_serviceproxy.conf
and change the lines by substituting the * with the lower IP4 Adress as applicable, leaving the other available for the virtual sites. Repeat for the next port as in this file, ie:
<VirtualHost *:80>
<VirtualHost *:443>
<VirtualHost *:8443>
<VirtualHost *:8843>
<VirtualHost *:8008>
<VirtualHost *:8080>
but take care not to change the structure.
Create the virtual domains (websites) in the Websites window of server. Ensure that besides the Zone, A records, C records, DNS (referring to the primary DNS) are all in place. Restart the Mac and test. If the failure of too many redirects occur on your profile manager, change the SSL port (443) back.
Maybe Strontium can explain why the redirect problem is still there as I have searched, but have not found as yet the reason.
Mine works without a problem, and this has been throught several iterations of upgrades.
Leo