Languages

Archived - OS X Lion: Advanced Apache configuration

Server.app's Web Service panels expose a small subset of Apache's configurable directives. Advanced administrators may need to make Web Service configuration changes beyond that subset.

This article has been archived and is no longer updated by Apple.

There are several mechanisms for advanced configurations: 

  • Place global-scope directives in /etc/apache2/httpd.conf
    This file is not overwritten by Server.app. Directives there are generally inherited by virtual hosts unless they are specifically overridden.
  • Edit the virtual host template file in /etc/apache2/sites-disabled/default_default.conf.default. Changes in the template will be reflected in any new sites created with Server.app.
  • Use the webappctl(8) and webapp.plist(8) mechanism.
    This typically involves putting Apache directives in an "Include" file, creating a webapp.plist file that references the Include file, and using webappctl to enable/disable the webapp for a specific site. You can also use the Apple created plist files in /etc/apache2/webapps to enable or disable services for your own virtual hosts.
  • WebMail
    To enable WebMail for a virtual host use a command of the form:
    webappctl start com.apple.webapp.webmailserver www.example.com

    To disable WebMail for a virtual host use a command of the form:
    webappctl stop com.apple.webapp.webmailserver www.example.com
  • WebDAV
    To enable WebDAV for a virtual host use a command of the form:
    webappctl start com.apple.webapp.webdavsharing www.example.com

    To disable WebDAV for a virtual host use a command of the form:
    webappctl stop com.apple.webapp.webdavsharing www.example.com
  • Custom service
    To enable a custom service for a virtual host:
    • Create an "Include" file in /etc/apache2/ that includes the needed Apache directives
    • Create a plist file for the service in /etc/apache2/webapps
    • Use webappctl to start your newly created service
Last Modified: Apr 8, 2014
Helpful?
Yes
No
Not helpful Somewhat helpful Helpful Very helpful Solved my problem
Print this page
  • Last Modified: Apr 8, 2014
  • Article: HT4813
  • Views:

    79895
  • Rating:
    • 58.0

    (594 Responses)

Additional Product Support Information

Start a Discussion
in Apple Support Communities
See all questions on this article See all questions I have asked