Options -Indexes
,取消列出目錄檔案。
[root@kvm8 ~]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/html"> Options -Indexes AllowOverride None Order allow,deny Allow from all </Directory>
[root@kvm8 ~]# /etc/init.d/httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]
[root@kvm8 ~]# cd /var/www/html/abc [root@kvm8 abc]# touch index.html
Options -Indexes
,取消列出目錄檔案。在 httpd.conf 中將開放瀏覽的目錄獨立設定 Indexes,則連到 http://kvm8.deyu.wang/abc 時就會到出目錄中的檔案。
[root@kvm8 ~]# vim /etc/httpd/conf/httpd.conf <Directory "/var/www/html/abc"> Options Indexes AllowOverride None Order allow,deny Allow from all </Directory>