1
3

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.

Apache2 の ssi 有効化

Posted at

こちらと同じことを今のバージョンで行いました。
ssi有効化

確認した Apache2 のバージョン

$ apache2ctl -v
Server version: Apache/2.4.41 (Ubuntu)
Server built:   2020-04-13T17:19:17

モジュールのロード

sudo a2enmod include

設定ファイル

<Directory /var/www/html/public_test>
	Options +Includes +FollowSymLinks
	AllowOverride none
	Require all granted
	AddType text/html .html
	AddOutputFilter INCLUDES .html
</Directory>

設定が正しいかの確認

sudo apache2ctl configtest

Apache2 の再起動

sudo systemctl restart apache2

テストに使った html ファイル

aaa.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8" />
<title>ssi aaa
</title>
</head>
<body>
<p />
<h2>ssi のテスト</h2>
<!--#echo var="DATE_LOCAL" --><p />
<p />
Jul/28/2020 AM 06:00<br />
</body>
</html>

ブラウザーでアクセスした結果
ssi_jul28_2020.png

1
3
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
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?