Options ExecCGI is off in this directory: /Tool/www/samba

简介:

利用apache搭建的Samba server 利用changepassword组件用户自行更改密码环境:

访问:http://192.168.25.57/samba/changepassword.cgi      报403错误

1
2
3
4
5
[root@Linux9 samba] # curl -I 192.168.25.57/samba/changepassword.cgi
HTTP /1 .1 403 Forbidden
Date: Tue, 05 Jan 2016 08:49:56 GMT
Server: Apache /2 .4.17 (Unix) PHP /5 .5.9
Content-Type: text /html ; charset=iso-8859-1

查看apache安装程序目录错误日志:

1
2
cat  /usr/local/apache2/logs/error_log
[Tue Jan 05 18:29:02.313632 2016] [cgid:error] [pid 29240:tid 3075713936] [client 192.168.30.228:59435] AH01262: Options ExecCGI is off  in  this directory:  /Tool/www/samba/changepassword .cgi

提示找不到

1
off  in  this directory:  /Tool/www/samba/changepassword .cgi   #找不到该配置文件

编辑apache主配置文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
213    DocumentRoot  "/usr/local/apache2/htdocs"
214 <Directory  "/Tool/www/samba" >                          #改成changepassword安装目录
                    
215      #
216      # Possible values for the Options directive are "None", "All",
217      # or any combination of:
218      #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
219      #
220      # Note that "MultiViews" must be named *explicitly* --- "Options All"
221      # doesn't give it to you.
222      #
223      # The Options directive is both complicated and important.  Please see
224      # http://httpd.apache.org/docs/2.4/mod/core.html#options
225      # for more information.
226      # Options Indexes FollowSymLinks ExecCGI

执行/usr/local/apache2/bin/apachectl restrt       #重启apache

         /usr/local/apache2/bin/apachectl -t           #语法检查

刷新浏览器正常访问.

本文转自 boy461205160 51CTO博客,原文链接:http://blog.51cto.com/461205160/1731849


相关文章
|
7月前
|
网络安全 数据安全/隐私保护
basic-ftp 550 Can't check for file existence
basic-ftp 550 Can't check for file existence
|
4月前
|
小程序
【小程序】报错:no such file or directory, access ‘wxfile://usr/miniprogramLog/log2‘
【小程序】报错:no such file or directory, access ‘wxfile://usr/miniprogramLog/log2‘
216 0
|
4天前
|
存储 数据安全/隐私保护 开发者
LDAP 和 Active Directory 的区别
【4月更文挑战第10天】
18 4
|
1月前
|
安全 PHP
解决pcntl_fork() has been disabled for security reasons in file /www/wwwroot/192.168.21.2/vendor/wor
解决pcntl_fork() has been disabled for security reasons in file /www/wwwroot/192.168.21.2/vendor/wor
32 0
解决pcntl_fork() has been disabled for security reasons in file /www/wwwroot/192.168.21.2/vendor/wor
|
4月前
Error: Cannot create file “D:xampp\xampp-controlin“.拒绝访问。
Error: Cannot create file “D:xampp\xampp-controlin“.拒绝访问。
|
5月前
|
Apache
系统找不到指定的路径。 : AH02291: Cannot access directory ‘D:/xp.cn/www/wwwroot/admin/PhpTest_10006/log/‘ for e
系统找不到指定的路径。 : AH02291: Cannot access directory ‘D:/xp.cn/www/wwwroot/admin/PhpTest_10006/log/‘ for e
26 0
|
Linux PHP
configure: error: Cannot find ldap libraries in /usr/lib
<p style="padding-top:0px; padding-bottom:0px; margin-top:0px; margin-bottom:0px; clear:both; height:auto; overflow:hidden; color:rgb(80,80,80); font-family:宋体,'Arial Narrow',arial,serif; font-siz
1751 0