apache如何防范目录遍历漏洞?
编辑httpd.conf
找到“
1
|
Options Indexes FollowSymLinks
|
”
将Indexes去掉,更改为“
1
|
Options FollowSymLinks
|
”即可。
apache tomcat如何防范目录遍历漏洞?
1、编辑apache的httpd.conf
找到“
1
|
Options Indexes MultiViews
|
”中的Indexs去掉,更改为“
1
|
Options MultiViews
|
”即可。
2、编辑tomcat的conf/web.xml
找到
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<servlet>
<servlet-name>default<
/servlet-name
>
<servlet-class>org.apache.catalina.servlets.DefaultServlet<
/servlet-class
>
<init-param>
<param-name>debug<
/param-name
>
<param-value>0<
/param-value
>
<
/init-param
>
<init-param>
<param-name>listings<
/param-name
>
<param-value>
true
<
/param-value
>
<
/init-param
>
<load-on-startup>1<
/load-on-startup
>
<
/servlet
>
|
将“<param-value>true</param-value>”此行的true改为false即可。
编辑好后,记得重启相应的服务生效。