서버 apache 2.4 이상에서 noindex 처리하기
서버에 mod_dir 설치를 합니다.
LoadModule dir_module modules/mod_dir.so 를 httpd.conf loadModule 마지막줄에 추가해줍니다.
<IfModule dir_module>
DirectoryIndex index.html index.php index.jsp
</IfModule>
위 코드를 httpd.conf에 적당한곳에 위치 시켜줍니다.
<Directory />
AllowOverride none
Require all denied
</Directory>
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
require all granted
</Directory>
httpd.conf 내용을 이렇게 정리해주시면 인덱스가 없는경우 fobiden 에러가 표시될것입니다.
추가로 .htacess .htpasswd 에대한 접근권한입니다.
<Files ".ht*">
#require all denied
Order allow,deny
Allow from all
Satisfy All
</Files>
