Category Archives: Apache2

Web server in OSX (Apache2, dammit!)

There’s an Apache2 in OSX!!!

Apache2! It’s been awhile since I touched httpd.conf… so many memories… ūüėČ

It’s all described in this tutorial:¬†

It’s dead simple – see/edit¬†/etc/apache2/httpd.conf to find or set DirectoryRoot (mind directory access rights) and run “sudo apachectl start” (stop, restart).

To enable user websites, add following to etc/apache2/users/USERNAME.conf :

<Directory "/Users/USERNAME/Sites/">
Options Indexes Multiviews
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all

and then it’d be served as¬†

Also, generating self-signed certificates:

And adding them to OSX keychain:

And you’d need to put them into¬†/private/etc/apache2/ssl/ and (potentially) edit¬†/private/etc/apache2/extra/httpd-ssl.conf and enable (uncomment)

Include /private/etc/apache2/extra/httpd-ssl.conf


LoadModule ssl_module libexec/apache2/

in /etc/apache2/httpd.conf

and run “apachectl restart” as root.

Champagne for all!

/   \
||  |
||  |    .    ' .
|'--|  '     \~~~/
'-=-' \~~~/   \_/
       \_/     Y
        Y     _|_