I have installed Mac OSX Mavericks Server and I would like to add some features to the Apache Server (gitolite, redmine, etc.) I've started with updating the httpd_server_app.conf
file in /Library/Server/Web/Config/apache2
but unfortunately it has been overwritten by the server to its default. Maybe because I've updated something in the UI, or an update occurred… Anyway, I would like to know how can I update the configuration file in a permanent and persistent way, and still benefit the OSX Server UI and/or updates…
I've probably missed the big : "Put your own things here:" label…
PS: By the way, I wish to modify some of the current configuration, not only adding things…
Best Answer
From the ReadMe.txt in that folder:
I haven't tested this extensively, but the Apple admin tools seem to leave
Include
directives in this file alone. Another option is to put your settings in a file in /Library/Server/Web/Config/apache2/other/, since the master fileInclude
s everything in that directory automatically. Also, if you need to add settings only to specific virtual sites, you can addInclude
directives to the files in /Library/Server/Web/Config/apache2/sites/ and the admin tools seem to leave them alone.Changing settings (rather than just adding) is trickier; I don't know of a general "safe" way to do this, so you'd have to take them on a case-by-case basis. There are probably some things you can't safely change. This is one of the reasons I can't really recommend using OS X Server as a general-purpose web server: it's configuration is extensively modified to support the various web-based services OS X Server provides (profile manager, wiki, webcal, webDAV file sharing, etc) and if you're trying to make extensive modifications of your own... the probability that you and Apple's configs will trip over each other gets unpleasantly high. OS X Server is good for running the built-in web-based services, but I'd use something else if you're going much beyond what's built in.
BTW, a quick note about the rather nonstandard location of apache files in OS X Server: there are at least three apache2 directories full of config files: