Just wanted to see if there are any objections to move the Apache and PHP installations from their current location in ‘/Library/’ to ‘/usr/local/’

The layout for Apache will become:

<layout DIYMacServer>
    prefix:        /usr/local/apache2
    exec_prefix:   ${prefix}
    bindir:        ${exec_prefix}/bin
    sbindir:       ${exec_prefix}/bin
    libdir:        ${exec_prefix}/lib
    libexecdir:    ${exec_prefix}/modules
    mandir:        ${prefix}/man
    sysconfdir:    /etc/httpd/
    datadir:       /var/www
    installbuilddir: ${datadir}/build
    errordir:      ${datadir}/error
    iconsdir:      ${datadir}/icons
    htdocsdir:     ${datadir}/htdocs
    manualdir:     ${datadir}/manual
    cgidir:        ${datadir}/cgi-bin
    includedir:    ${prefix}/include
    localstatedir: /var
    runtimedir:    ${localstatedir}/run
    logfiledir:    ${localstatedir}/log/httpd
    proxycachedir: ${localstatedir}/cache/httpd

This brings everything in-line with normal other installs. The configuration is as it was with the original Apache in ‘/etc/httpd‘ and the log, cache and pid file are all in ‘/var‘. Although I’m still having doubts about the datadir, I would have put it in ‘/var/www/‘ but on the normal OS X install it would be in ‘/Library/WebServer/‘. What do you think ?

PHP5 will be located in ‘/usr/local/php5‘, the php.ini file will be located in ‘/etc‘.

I hope to open up the new site tomorrow if all goes well…


Well it has been a few days since I got the email for the new release of Apache and I was going to write about it sooner. But as happens often I got sidetracked and didn’t think of it until error reports came in via email and comments that there was something wrong with my compilation instructions.

It looks like we need an extra flag to compile properly namely the “--with-included-apr” option to force internal APR functionality and not from another package. The installation page has been updated accordingly !

There are more changes and bugs fixed besides this change, you can read all about them at the download page of apache, read the Changes file. I can’t link to it directly as it is dynamically altered to link to a mirror in your neighborhood.


I used yesterday to recompile Postfix, Courier-Auth, Apache and PHP with the 5.0.24a MySQL libraries. I just used my own instructions to compile everything.

I first did Postfix and Courier-auth as they would cause the least problems when it would go wrong. My backup mailserver would still receuve all mail and forward it to me when the mailserver is back online. It all went without a hitch, just did a restart of the programs and all was running as expected.

Apache posed an issue, how to compile and install, followed by compiling PHP without disturbing all the people looking at my sites. In the end it was simple. Compile and install Apache2, don’t restart Apache so the old version keeps running but the new software is available on disk. Then compile and install PHP using the new Apache installation files and when that is done restart Apache and all would be fine. Well that’s what I thought…

There was a small error in the modules that I included in the httpd.conf. Some of them, all concerning authentication, where rewritten and given different names. I was still trying to load the old ones as I didn’t update my httpd.conf to reflect these changes. So Apache2 wouldn’t start. I just commented out the old modules and added the new ones in my httpd.conf and presto, Apache 2.2.3 and PHP 5.1.6 are now running on my server, together with Postfix 2.2.3.

They’ve been running for almost a day now and I haven’t gotten any complaints yet.

If you are still running “ISP in a box” version 1 and want to upgrade but are still a bit afraid on how to do this let me know and I’ll help out.

Just found out there was an error, got a call on the phone from some of my friends that they couldn’t email anymore. When checking the logfiles I foud out I forgot a step after compiling and installing Courier auth:

sudo chmod o+x /usr/local/var/spool/authdaemon

In the logfile there was the error:

SASL authentication failure: cannot connect to Courier
      authdaemond: Permission denied

Which means I didn’t follow my own instructions !


Wow, did I forget to do something. I was just cleaning up my mac mini server. Well that’s what you do when you’ve been playing around with lots of configurations and compiled different versions of software to see if it will work. When I found out that I completely forgot about the logfiles for my Apache installation. Some of the logfiles of the more popular sites where already a whopping 100+ Mb.

Normally, for the Apple installed Apache, the logfiles would reside in /var/log/httpd, but I didn’t think and just followed the standard layout that was provided by the installation which directed the logfiles into /Library/Apache2/logs as you can see in the installation document. This means that the default weekly script (located in /etc/periodic/weekly) that takes care of the regular maintenance of your Mac, and rotates your Apache logfiles, didn’t take care of my new Apache2 logfiles. (more…)


This as taken me much, much longer than I ever planned it to take. First there was the introduction of the Intel based Mac’s that I needed to comprehend. Secondly the many problems I’d encountered with the shared library support in the MySQL as many of you have read in previous posts. Third there was the happy occasion of the birth of my daughter which prevented me from spending much time behind the screen.

But it’s done, I’ve finally finished the instruction for installing (and compiling) MySQL 5, Apache 2 and PHP 5. Hope you are able to use them well.

I’m currently working on the instructions for the mailserver as there are some tweaks needed to get that working with the current setup. There where some issues with Intel based Macs and SSL support but I’ve got that solved. Hope to get that finished in a very short time… (not naming dates here, getting careful… ;-) )


Just a quick post, after I just found out how to do this in a very simple way, about some new documentation I created on how-to simply secure multiple virtual domains on your webserver. It’s not perfect (there will be warnings in the browser), but it will work. Continue and read the page to see how simple it can be.

It’s the most simple way to do this without spending any money on official certificates or multiple ip-addresses. Especially that last point was the most difficult to solve. It seems, but I don’t know for sure as I’m not an expert on the subject, that it isn’t possible to configure more than one certificate per ip-address. Forgot the correct explanation and won’t go into wild guessing…

It works for me and I hope it will for you as well.

Note: People will get a warning that your certificate isn’t signed by a certified authority and if you use different domain names the browser will complain that the certificate and the domain don’t match. But if the user will accept the warning and continues the access to the website will be secured by SSL. This is very usefull if you don’t want your password to be send in the clear.


Just a short post, I had a lot of questions from people on how they should go forward setting up websites on their newly installed Apache2 webserver. I had documented how to do this for the postfix mailserver from the beginning of this project. So here is the long overdue documentation that makes it all clear on how to setup name-based virtual hosts on Mac OS X. This by the way works for all versions of Apache.


I’m rewriting, as discussed earlier, the ISP in a box documentation. Most effort is currently being put into removing the dependancies from the Server Logistics installation packages. They are very slow in updating their releases and I didn’t like to depend on them in case there is another security issue. The other item I wanted to address was the remarks I got on improving the installation process itself. People suggested if I could provide the configuration files and compilation scripts to prevent some errors and make the whole process a lot easier.

So here is the first public preview of the first pages of the new documentation. it’s not yet ready to be used properly as I only got MySQL and Apache2 covered. PHP is coming before the end of the week. But I wanted to see how you like the new way of documenting. Hope you like it…

Two more remarks:

  • I’ve created a page to keep you informed on the funding of the new Intel based Mac mini. Donations and AdSense income are going strong and I think I can order an Intel based Mac mini before the end of the summer. I you want to contribute to this effort as well, use the PayPal button on the right side of the page.
  • I don’t like the phrase “ISP in a box” too much but I still can’t think of another one that covers what I’m documenting here. So I wanted to ask you, can you think of a better phrase or slogan ? Or do you think “ISP in a box” is good enough ? Please let me know what you think.

I was stuck with a problem I encountered a few weeks ago when I got back from my holiday. I was trying to post my holiday snapshots on my webserver to show to my friends, when I noticed that the big pictures didn’t want to load completely in the browser. They only downloaded for about 1/3 in the browser and I had to refresh the page several times to get the full photo. I’ve been banging my head on this for some time until David W. pointed me to a bug in Apache 2.0.54 that caused the error. He also explained how I could upgrade to 2.0.55 and keep all the things I had configured with the package from Server Logistics in place. If you have the Apache package running from them you might as well follow these instructions as well. (more…)


I’ve started the new year with migrating everything from my old Sun Ultra 5′s who have been running my internet services for the past few years to the Mac mini. The pages you are looking at now are served from a Mac mini as it was my intention for some time. The mini is setup using my own documentation with no deviation whatsoever. (more…)

Next Page »