■ Web構築
一 覧 / □ □
【 Apache2.4で、アクセス制限の記述方法が変更 】 

Apache2.4で、アクセス制限の記述方法が変更されていた - Qiita
https://qiita.com/nwsoyogi/items/c8eb1fedef3c00c5fbac

2.2系
<Directory "/home/sandbox/htdocs">
    Order allow,deny
    Allow from all
</Directory>
 
2.4系
<Directory "/home/sandbox/htdocs">
    Require all granted
</Directory>
 
conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
  ServerName sandbox
  ServerAdmin test@example.com
  DocumentRoot /home/sandbox/htdocs/
  ErrorLog /home/sandbox/logs/error_log
  CustomLog /home/sandbox/logs/access_log combined
 
  <Directory /home/sandbox/htdocs>
    Options FollowSymlinks Includes
    AllowOverride All
    AddType text/html .html
 
    # ここを変更
    Require all granted
  </Directory>
</VirtualHost>
 
Apache2.4 のRequireディレクティブでアクセス制御を行う - 闘うITエンジニアの覚え書き
https://www.magata.net/memo/index.php?Apache2.4%20%A4%CERequire%A5%C7%A5%A3%A5%EC%A5%AF%A5%C6%A5%A3%A5%D6%A4%C7%A5%A2%A5%AF%A5%BB%A5%B9%C0%A9%B8%E6%A4%F2%B9%D4%A4%A6

Apache | Requireディレクティブ:アクセスの許可や拒否などのアクセス制限を行う(Apache2.4以降)
https://www.javadrive.jp/apache/allow/index1.html





資 料