OS X Server's Apache uses the old httpd.conf

Hi!


I had been running Apache on my MBP with 10.8 sans OS X Server.

But I sprung the $20 for OS X Server 2.2.1 recently. I see that Server's Apache mostly lives in /Library/Server/Web/ , and is supposed to use Config/apache2/httpd_server_app.conf instead of the old /etc/apache2/httpd.conf .


Yet when I toggle apache in the OS X Server.app, it's reading config from that old httpd.conf .


What do I want to change to make sure Server.app is starting up its own version and configuration of httpd?

(I don't have any existing configuration that I need to migrate; I just want to start with a clean version of OS X Server. That will be a lot easier for me to handle across my multiple environments and (hopefully) a new CPU in the near future ;-)



(Looks like this post was curious about the same thing, but he got no love)

MacBook Pro, OS X Server, 10.8

Posted on Sep 3, 2013 9:03 PM

Reply
8 replies

Sep 4, 2013 3:57 AM in response to Linc Davis

That's a good question.

I infer it by browsing to http://localhost/. The page that comes up is in the doc root specified in /etc/apache2/httpd.conf /Library/WebServer/Documents/index.html.en . (And similarly I can browse to other files I place in that directory). And then if I edit that conf file and restart Apache, the changes are apparent.


Is there something in a log that would help me directly determine that? Where is Server.app configured?

Sep 4, 2013 7:52 AM in response to Linc Davis

Man, that was a helpful nudge; thanks Linc.


At some point in the past I set up Apache to come up automatically. I was about to type "I can't remember which recipe I would have followed", but seems I did it this time by installing Web Sharing.prefPane .


Now I've toggled Apache off (in both Server.app and that prefPane. I removed the prefPane.

But I still get the same result from launchctl.


What should I see in launchctl?

Any thoughts on where I should look next?

Sep 4, 2013 9:28 AM in response to AlanNYC

This thread was helpful for prescribing a brute force method.

With all Server's services stopped and the app closed, I deleted /var/db/.ServerSetupDone and /Library/Preferences/com.apple.servermgr* .


Server.app then launches into its guided setup mode, and that has Apache apparently back in its vanilla state and reading from confs at /Library/Server/Web/Config/apache2/ .

In particular, launchctl returns:

{ "Label" = "org.apache.httpd"; "LimitLoadToSessionType" = "System"; "OnDemand" = false; "LastExitStatus" = 0; "PID" = 25; "TimeOut" = 30; "ProgramArguments" = ( "/usr/sbin/httpd"; "-D"; "FOREGROUND"; "-f"; "/Library/Server/Web/Config/apache2/httpd_server_app.conf"; "-D"; "WEBSERVICE_ON"; ); };

and browsing to localhost loads the expected content (i.e., the files I have at /Library/Server/Web/Data/Sites/Default).


So that was brute force, and I'd like to know how to manipulate Server.app a little more precisely, but it's mostly academic.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

OS X Server's Apache uses the old httpd.conf

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