メモ
2.2
vhost.conf
<VirtualHost _default_:80>
DocumentRoot /var/www/vhost/localhost/html
ServerName localhost
ErrorLog logs/localhost-error_log
CustomLog logs/localhost-access_log common
<Directory /var/www/vhost >
# default charset UTF-8
AddDefaultCharset utf-8
# .htaccess setting
AllowOverride All
# SSI OK
# SymbolicLink OK
Options Includes FollowSymLinks
Order Deny,Allow
Allow from all
</Directory>
<Files ~ "^\.">
# .ht*
# .svn*
# .csv*
# etc
Deny from all
</Files>
<Files ~ ".*conf.*">
# config.inc.php
# ****.conf
Deny from all
</Files>
<Files ~ "(\.tmpl|\.tpl|\.vm|\.mayaa|\.properties|\.back|\.bk|~|[0-9]+|build.xml)$">
# .tmpl .tpl .vm : Template Files
# .mayaa .properties : Control File
# .back .bk *~ *n : Backup File
# build.xml : Ant Build Control File
Deny from all
</Files>
</VirtualHost>
2.4
vhost.conf
<VirtualHost _default_:80>
DocumentRoot /var/www/vhost/localhost/html
ServerName localhost
ErrorLog logs/localhost-error_log
CustomLog logs/localhost-access_log common
<Directory /var/www/vhost >
# default charset UTF-8
AddDefaultCharset utf-8
# .htaccess setting
AllowOverride All
# SSI OK
# SymbolicLink OK
Options +Includes +FollowSymLinks
# aapche 2.4 change config
# Order Deny,Allow
# Allow from all
Require all granted
</Directory>
<Files ~ "^\.">
# .ht*
# .svn*
# .csv*
# etc
# Deny from all
# apache 2.4 changed
Require all denied
</Files>
<Files ~ ".*conf.*">
# config.inc.php
# ****.conf
# Deny from all
# apache 2.4 changed
Require all denied
</Files>
<Files ~ "(\.tmpl|\.tpl|\.vm|\.mayaa|\.properties|\.back|\.bk|~|[0-9]+|build.xml)$">
# .tmpl .tpl .vm : Template Files
# .mayaa .properties : Control File
# .back .bk *~ *n : Backup File
# build.xml : Ant Build Control File
# Deny from all
# apache 2.4 changed
Require all denied
</Files>
</VirtualHost>