禁止浏览wordpress文件夹的方法

如何禁止别人通过web浏览wordpress文件夹,限制wordpress浏览文件夹的权限,其实很简单,就一句话,改完别忘记reload apache2。

  1. root@debian:/etc/apache2/sites-available# vi default
  2.  
  3.         <directory /var/www></directory>
  4. #              Options Indexes FollowSymLinks MultiViews
  5.                 Options FollowSymLinks MultiViews /* 去掉 Indexes
  6.                 AllowOverride None
  7.                 Order allow,deny
  8.                 allow from all
  9.                 # This directive allows us to have apache2's default start page
  10.                 # in /apache2-default/, but still have / go to the right place
  11. #                RedirectMatch ^/$ /apache2-default/

Read more »

1 1