Abs*_*Abs 7 mod-rewrite permissions url http-status-code-404 apache-2.2
脚本向我的 URL 发出 GET 请求,如下所示:
http://mydomain.com/cgi-bin/uu_ini_status_audios.pl?tmp_sid=b742be1d131c4d32237a9f1fcdca659e&rnd_id=0.2363453360320319
但是,我立即收到了 404 返回:
The requested URL /cgi-bin/uu_ini_status_audios.pl was not found on this server.
但是该脚本存在于我的服务器上,我可以看到该文件!它具有正确的权限(我肯定给了它 777)。它也归我的 apache 用户所有,并且属于 apache 组。
我错过了什么??
感谢您对此的任何帮助!
我以为它会是一个 htaccess(重写),但我不认为它是了。我尝试在其中放置一个 index.php 文件并尝试通过我的 URL 访问它,但我什至不能这样做!我试过这个:
http://mydoamin.com/cgi-bin/index.php
- 同样的 404 错误!我在我的错误日志中得到了这个:
[Tue Sep 14 14:42:49 2010] [error] [client xx.xxx.xx.xxx] script not found or unable to stat: /var/www/vhosts/mydomain.com/cgi-bin
Run Code Online (Sandbox Code Playgroud)
访问日志文件:
xx.xxx.xx.xxx - - [14/Sep/2010:14:48:25 +0200] "GET /cgi-bin/index.php HTTP/1.1" 404 475 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9 (.NET CLR 3.5.30729)"
我的 htaccess 文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^blog/ - [L]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [R=301,L]
RewriteRule ^search/(.*)/(.*)/(.*)/(.*) /search.php?searchfor=$1&sortby=$2&page=$3&searchterm=$4
RewriteRule ^confirmemail/(.*) /confirmemail.php?code=$1
RewriteRule ^resetpassword/(.*) /resetpassword.php?code=$1
RewriteRule ^resendconfirmation/(.*) /resendconfirmation.php?userid=$1
RewriteRule ^categories/ /categories.php
RewriteRule ^([-_~*a-zA-Z0-9]+)(\/)?$ /memberprofile.php?username=$1
RewriteRule ^browse/audios/(.*)/(.*)/(.*)/(.*) /audios.php?sortby=$1&filter=$2&page=$3&title=$4
RewriteRule ^browse/categories/audios/(.*)/(.*)/(.*)/(.*) /categoryaudios.php?sortby=$1&filter=$2&page=$3&title=$4
RewriteRule ^audios/(.*)/(.*) /playaudio.php?audioid=$1&title=$2
RewriteRule ^download/audio/(.*)/(.*) /downloadaudio.php?AUDIOID=$1&title=$2
RewriteRule ^members/audios/(.*)/(.*) /memberaudios.php?pid=$1&username=$2
RewriteRule ^syndicate/audios/(.*)/(.*) /syndicateaudios.php?filter=$1&title=$2
</IfModule>
Run Code Online (Sandbox Code Playgroud)
[root@smydomain ~]# ls -la /var/www/vhosts/mydoamin.com/httpdocs/cgi-bin/
total 60
drwxr-xr-x 3 apache root 4096 Sep 14 14:37 .
drwxr-x--- 20 som psaserv 4096 Sep 14 14:40 ..
drwxr-xr-x 2 apache root 4096 Sep 7 03:01 configs
-rwxrwxrwx 1 apache root 4 Sep 14 14:37 index.php
-rwxrwxrwx 1 apache apache 6520 Sep 7 03:01 uu_ini_status_audios.pl
-rwxr-xr-x 1 apache root 3215 Sep 7 03:01 uu_lib_audios.pl
-rwxr-xr-x 1 apache root 30249 Sep 7 03:01 uu_upload_audios.pl
Run Code Online (Sandbox Code Playgroud)
SuExec 给我带来了问题。
禁用此功能意味着 cgi-bin 中的脚本可以运行。但必须确保该目录和脚本具有相同的权限,即0755。此外,该目录和脚本必须属于同一个人。
这些是让我的脚本运行的要求!我希望这可以帮助别人。
归档时间: |
|
查看次数: |
34189 次 |
最近记录: |