Mac OS Xの“Web共有”でPHPやCGIを有効にする
手順
- /etc/apache2/httpd.conf の以下の行のコメントアウトを外す.
#LoadModule php5_module libexec/apache2/libphp5.so
- /etc/apache2/users/${USERNAME}.conf
<Directory "/Users/USERNAME/Sites/"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory>
このようになっているので,以下のように適宜書き加える.
<Directory "/Users/USERNAME/Sites/"> AddHandler cgi-script .cgi Options Indexes MultiViews Includes ExecCGI AllowOverride None Order allow,deny Allow from all </Directory>
- システム環境設定 → 共有 とたどって「Web共有」を一旦無効にして再度有効化.