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

WindowsのXamppで任意のディレクトリをルートに設定する

Last updated at Posted at 2019-01-30

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 で全てアクセス許可にする設定をしてあげると、エラーにならない。

参考

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