Apache and PHP on Leopard

Out of the box, personal websites weren’t working. Mainly because Leopard ships with Apache2 compared to Tiger’s 1.3.

The following helped solve the problem for me.

  • Enable php5 by updating /etc/apache2/httpd.conf and uncomment the line
    LoadModule php5.module...
  • Turn on personal web sharing via System Preferences.
  • Users configuration is done in /etc/apache2/users. Ensure that you have a
    youruserid.conf
    file with appropriate directives. Mine contains
      <Directory "/Users/youruserid/Sites/">
          Options Indexes MultiViews
          AllowOverride All
          Order allow,deny
          Allow from all
      </Directory>
    
  • Logs are written to /var/log/apache2 rather than /var/log/httpd.