Thursday, February 13, 2014

ยกเลิกไม่ให้ Apache/httpd list files and directory

root@khonkaensoft#

#vi /etc/httpd/conf/httpd.conf

เข้ามาแล้วค้นหาโดยกด

/Options Indexes  แล้วกด enter

 * กด i แก้ไข   กด Esc ออกจากแก้ไข

<Directory "/var/www/html">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
    Options
Indexes FollowSymLinks 

VirtualHost HTTP redirect to HTTPS

<VirtualHost *:80>     ServerName www.example.com     Redirect / https://www.example.com/ </VirtualHost> <VirtualHos...