본문 바로가기

NCS/기술적보안구축

Apache - avoid Directory Indexes

 

vi /etc/httpd/conf.d/welcome.conf

# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL.  To disable the Welcome page, comment
# out all the lines below.
#
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>
 

 

vi /etc/httpd/conf/httpd.conf

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

 

service httpd restart