Replacing Mac OS Apache with macports Apache

David Vergnaud dvergnaud at
Sun Feb 14 11:14:30 PST 2010

Hey Ryan, hey everyone,

thx a *lot* for the *very* exhaustive and helpful answer!! :-)))
now i understand why it is important to keep the macports builds separated from the ones delivered by apple -- makes great sense, and updating/adding new libraries simply works like a charm when it was rather intimidating with the former installation :-)

Thanks to your explanations the upgrade went quite smoothly. here's just 1-2 details for people who might also attempt it: 
- I had to "reactivate" PHP after switching to the new server -- it's not activated by default in httpd.conf. In order to do that, add the following line to your httpd.conf (I hope i did this right):
LoadModule php5_module modules/
at the end of the "LoadModule" list. 
Then, add the following line at the end of httpd.conf (I added it just before the "Secure connections" section):
Include conf/extra/mod_php.conf
This will tell the Apache server to handle .php files with the php5 module. 

After that, it's just tweaking the httpd.conf file to get the properties right for you. I find it useful to have an httpd.conf.local file in the same directory, which I include at the end of the httpd.conf and use for e.g. directory-specific configuration. I just had to copy it from /etc/apache2/ into /opt/local/apache2/conf and all directories were again configured properly. 

Oh, and of course one also has to reconfigure PHP properly -- basically, take either php.ini-development or php.ini-production (depending on your basic needs) from /opt/local/etc/php5, copy it to php.ini and adapt it to your particular needs (e.g. I need post_max_size to be more than 8MB and up_load_max_filesize to be more than 2MB). 

I also find it quite practical to have the logs located at the same place as all other logs -- namely /var/log/ -- this value can also be updated in httpd.conf

well, again thx a lot for all the feedback, have a smashing day :-)



More information about the macports-users mailing list