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.

Apache VHost Location on 10.8.1 Server?

Hi folks. I'm having problems setting up my new Mini Server.


First off, is this the place to ask questions about Mountain Lion Server? 10.8.1 is what I have (there is no 10.8.2 yet) and there's no Mountain Lion option in these discussion groups.


I'm using the Server.app to set websites (what I'm assuming are VHosts) on the server. I have a handful. The whole VHost Apache conf files are not there. I can't figure out where they are. The right site is coming up when I ask for the "server website", but I want to make sure Apache is indeed doing its job. I also have to make sure the VHost entries have the right handlers, etc.


Anybody know where they are? There is no "sites" directory anymore. The only vhosts mention is in this directive:



Include /private/etc/apache2/extra/httpd-vhosts.conf


In that file, there's only two examples that obviously don't work. So how Apache knows about my VHosts, I have no clue why.


So what gives with the Server.app domain entries?


This is totally confusing.


Any insight appreciated.


Cheers

Mac Pro, OS X Mountain Lion (10.8.2), Hypercard UG!

Posted on Nov 26, 2012 5:03 PM

Reply
Question marked as Best reply

Posted on Nov 26, 2012 5:31 PM

Found it. They have a whole new system. Sigh.


/Library/Server/Web/Config/apache2/


It seems everything should be shoved over there.

2 replies

Nov 27, 2012 4:34 AM in response to BioRich

Careful when manually editing configuration files in /Library/Server/Web/Config/apache2/sites. There are a variety of parameters that will be overwritten by Server.app. Among them ServerName, Port, AuthName, AuthType, Limit, Require, Options, AllowOverride and some more.


Your safest bet is to add an include statement to the end of the configuration file in /Library/Server/Web/Config/apache2/sites. Something like:

Include /Library/Server/Web/Config/apache2/siteincludes/my.site.personal.conf

Next include all personalised parameters in the included file. This will make sure your changes are read by Apache and not overwritten by Server.app


If you need to cater to more advanced configurations, you should have a look at webapps (see man webapp.plist).


HTH,

Alex

Apache VHost Location on 10.8.1 Server?

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