Xamppの設定
ローカル環境でアクセスができるようにしたくてXamppの設定をしようとしたものの、403 Forbidden
エラーが出て手こずったのでメモ。
httpd-vhosts.conf
C:\xampp\apache\conf\extra\httpd-vhosts.conf
を開き、
<VirtualHost *:8081>
DocumentRoot "C:\Users\akr\path\to\directory"
<Directory "C:\Users\akr\path\to\directory">
Require all granted
</Directory>
</VirtualHost>
のように書く。
ポイント
Directory
タグと Require all granted
で全てアクセス許可にする設定をしてあげると、エラーにならない。
参考