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

Multiple websites

It seems pretty clear in the Server app how to configure hosting multiple websites but it doesn't seem to work. No matter what I put in, requests just go to the default Mac OS X Server site. Anyone had luck with this?

Mac mini, Mac OS X (10.6.7), OS X Server

Posted on Jul 20, 2011 12:42 PM

Reply
66 replies

Jul 24, 2011 3:04 PM in response to scott937

I do know it was tested by the developer community but I don't think Apple was taking the feedback really seriously. From all I am reading, I'm starting to believe it was an after thought to Apple. They don't even have a PDF of the Advanced Server Administration guide available, just a web version. I think this goes with the $50 price tag.

Jul 24, 2011 3:55 PM in response to CaLiFoRNiAWEBER

Any idea why adding NameVirtuaHost *:80 doesn't work for me? I had multiple websites that I hosted under SLS and can't get them to work here. Same DNS settings, etc. I add this line and it still doesn't redirect to my other sites.


The only thing that seems odd is when I type in the domain name for the alternate site, it appears as a red dot and does not turn into a green dot. What is that red/green dot testing? The fact that it is still red may be an indicator of what?

Jul 24, 2011 5:11 PM in response to CaLiFoRNiAWEBER

OK! This time it worked. The main difference is that I left a space between the NameVirtualHost line and the hash mark. Why that made a difference on the file being saved or changed, I don't know.


One other major thing I did was to move my website to the boot disc. I think I have an issue with how Server app is writing the path name to the website files I had stored on a difference disk. At one point along the way, I changed the name of that disc in the OS, but to the server, it appears to still have the old name. Where is the path for sites written out in the configuration?


Note that my users are on the non-boot disc, too, and the Server references their location fine...

Jul 24, 2011 8:41 PM in response to Jupeman

From what I can tell, your best bet is to completely avoid the "Web" panel. Any changes will whole-sale overwrite all the apache config files. Also, unlike previously, it appears that turning web services "Off" doesn't actually mean off. Because Apple depends on the web-server for new web-based config tools (e.g. Profile Manager) the On/Off switch just engages a different set of config rules that ignore all of the non-system websites.


To be sure you completely cycle apache I'd suggest "sudo apachectl restart" from the terminal.

Jul 25, 2011 8:46 AM in response to Jupeman

UPDATE: I found a work-around that has allowed me to get back 2 of my 3 virtual hosts.


Background: The "NameVirtualHost" fix alone was not working for me. I upgraded from Snow Leopard Server and no place I put NameVirtualHost would enable my <VirtualHost my.hostname.com:80> to work.


I read an apache.org website about VirtualHosts and DNS errors that says that a VirtualHost definition may be ignored if Apache cannot resolve the VirtualHost/ServerName to an IP address. My testing seems to indicate that my VirtualHost directives are just being skipped, so I tried putting in my static IP for the <VirtualHost> and then using the ServerName to specify the hostname for the virtual host. In addition, I added the 00000_MoreTestingRequired.conf file and added a NameVirtualHost line for each hostname.


Now several of my subdomains are working again! The only remaining issue is that I cannot specify separate virtual hosts for mainhostname.domain.com, domain.com, or www.domain.com.


So, maybe this is all a DNS issue?

Multiple websites

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