Apache2.2 のインストール

MacPortsからApache2を入れてみます。

$ port search apache
...
apache   www/apache     1.3.37       The extremely popular Apache http server
apache2  www/apache2    2.2.6        The extremely popular second version of the Apache http server
apache20 www/apache20   2.0.59       The extremely popular second version of the Apache http server
...
$ sudo port install apache2

結構長くかかったけど、完了。

$ cd /opt/local/apache2/conf/
$ sudo cp httpd.conf.sample httpd.conf
$ sudo vim httpd.conf
96行目のmod_ssl.soをコメントアウト(エラーが出るんでひとまず)
$ sudo /opt/local/apache2/bin/apachectl start

http://localhost/ を見ると、It works! 言われました。

OSの起動と同時にApache2を立ち上げるには、

$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist

でOK。