LoginSignup
1
2

More than 5 years have passed since last update.

VirtualHostでのApacheダイジェスト認証

Last updated at Posted at 2017-02-12

OS: CentOS 7

追加する場合はオプションなし

# htdigest -c /etc/httpd/.htdigestpw "<認可領域名>" <ユーザー名>

ユーザ指定の場合はRequre user [ユーザ名]

# vim /etc/httpd/conf.d/vhost/<ファイル名>
<VirtualHost 111.111.111.111:80>
        ServerName XXXXX.jp
        .
        .
        .

        <Location />
            AuthType Digest
            AuthName "<認可領域名>"
            AuthUserFile "/etc/httpd/.htdigestpw"
            Require valid-user
        </Location>

        <Directory /home/some/web/>
            .
            .
            .
        </Directory>
</VirtualHost>
1
2
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
2