Last active
May 23, 2016 11:08
-
-
Save iyuuya/85ed433c7ecc50994d42aea880f2d2f7 to your computer and use it in GitHub Desktop.
Apache: IP制限orBasic認証設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName hoge.example.com | |
DocumentRoot /var/www/path/to/app/public | |
ErrorLog logs/hoge_error_log | |
CustomLog logs/hoge_access_log combined | |
<Directory "/var/www/path/to/app/public"> | |
Options FollowSymLinks IncludesNoExec | |
AllowOverride FileInfo Indexes Limit Options | |
AuthType Basic | |
AuthName "hoge.example.com member only" | |
AuthGroupFile /dev/null | |
AuthUserFile /etc/httpd/htpasswd/hoge.htpasswd | |
Require valid-user | |
Satisfy any # Satisfy All にすると、両方をパスしないと駄目。 | |
Order deny,allow | |
Allow from 11.22.33.44 | |
Deny from all | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment