Apacheの設定(CGIおよびSSIの許可とインデクスファイルの指定)

Mac OS Xに関するヌマタメモ
2008年11月30日 00:46

sudo vi /etc/httpd/users/numata.conf としてこれを修正。

デフォルトの状態。

<Directory "/Users/numata/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

CGIの許可。

<Directory "/Users/numata/Sites/">
    AddHandler cgi-script cgi
    Options Indexes MultiViews ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

SSIの許可。

<Directory "/Users/numata/Sites/">
    AddType text/html shtml
    AddHandler server-parsed shtml
    AddHandler cgi-script cgi
    Options Indexes MultiViews ExecCGI Includes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

インデクスファイルの指定。

<Directory "/Users/numata/Sites/">
    AddType text/html shtml
    AddHandler server-parsed shtml
    AddHandler cgi-script cgi
    Options Indexes MultiViews ExecCGI Includes
    AllowOverride None
    Order allow,deny
    Allow from all
   <IfModule mod_dir.c>
        DirectoryIndex index.html index.shtml
    </IfModule>
</Directory>

設定後にシステム環境設定の「共有」から Apache を立ち上げ直すのを忘れずに。

参考資料

コメントを書く


トラックバックはありません。

トラックバックURL: http://numata.designed.jp/mt-tb.cgi/97