Q. [팁] Apache Directory 설정
안녕하세요 이지N비즈입니다.
Apache 설정 시 Directory 설정 내용 안내 드립니다.
해당 설정은 VirtualHost 절 안에 입력 하시면 해당 VirtualHost에만 적용 됩니다.^^
[모두 허용]
1. Directory 설정
<Directory "/home/webhome/">
Options FollowSymLinks MultiViews
AllowOverride AuthConfig
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
[특정 IP만 허용]
1. Directory 설정
<Directory ""/home/webhome/">
Options FollowSymLinks MultiViews
AllowOverride AuthConfig
Order deny,allow
Deny from all
Allow from <아이피 주소>
</Directory>
[암호 입력 성공시 허용]
1. 아이디 및 패스워드 생성
${APACHE_HOME}/bin/htpasswd -c ${APACHE_HOME}/passwd/password <아이디>
2. Directory 설정
<Directory "/home/webhome/">
AuthType Basic
AuthName "Restricted Files"
AuthUserFile "${APACHE_HOME}/passwd/password"
Require user <아이디>
</Directory>
감사합니다 좋은 하루 되세요.!