Apache Configuration on MacOS X 10.5.8

Base configuration:

  • Use the Server Admin Tool to navigate to “server.local” and stop all services except:
    • firewall, web, open directory
  • Stop the mailinglists service, so that it cannot block Postfix:
    • sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.wikid.mailinglists.plist
  • Web server documents root is: /srv/www/

Web Server configuration:

  • /etc/apache2/httpd.conf
  • Changes with respect to base installation:
LoadModule php5_module libexec/apache2/libphp5.so
LoadModule bw_module libexec/apache2/mod_bw.so

AddType video/ogg ogv
AddType video/ogg ogg
AddType video/webm .webm

GracefulShutDownTimeout 1000

MinSpareServers 8
MaxSpareServers 32
StartServers 1
MaxKeepAliveRequests 500
KeepAliveTimeout 5
MaxClients 512
ListenBackLog 256

Web Server PHP configuration:

  • /etc/php.ini
  • Changes with respect to base installation:
post_max_size = 1000M
upload_max_filesize = 1000M

Put robots.txt in documents root:

  • /srv/www/robots.txt
User-agent: *
Disallow: /one/directory/at/a/time/

Restart Apache gracefully:

sudo /usr/sbin/apachectl -k graceful # httpd.conf: GracefulShutDownTimeout 1000

See also suEXEC, PostFix and svnserve configuration.