0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【MAMP × SSI】SSIが組み込まれているファイルをローカル環境でも確認したい

Last updated at Posted at 2020-06-08

SSIを許可するためにはApacheサーバの設定を変更する必要がある。

① 「SSIとCGI(perl)」を許可する

/Applications/MAMP/conf/apache/httpd.conf(変更前)
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>

↓ に変更

/Applications/MAMP/conf/apache/httpd.conf(変更後)
<Directory />
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
</Directory>

② AddOutputFilterディレクティブでSSIを有効にする(どの拡張子に対してSSIディレクティブの解析するかを指定)

/Applications/MAMP/conf/apache/httpd.conf(変更前)
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>

↓ に変更

/Applications/MAMP/conf/apache/httpd.conf(変更後)
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml .html .htm .php
</IfModule>

③ Apacheを再起動したら問題なく表示できる(はず)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?