网盘外链工具安装及疑难问题解决过程

2013年10月6日

最早是使用了凉手抚温柔的网盘外链工具源码安装,但是在安装后却发现无法正常使用,因为我第一次安装的服务器是使用lighttpd解析环境的,所以开始以为是lighttpd的rewrite规则问题,还到处咨询其他网友rewrite规则的写法,但都没得到回应,所以自己动手写了一个,貌似规则是对的,但不知道为什么就是无法正常使用.转换不出来正确的外链地址,遇到的问题有几个,分别遇到以下的问题.这里详细描述问题并给出解决方法以方便以后遇到同样问题的朋友们解决,为这些问题我折腾了好多天.
1:“正在处理中,耐心等候,请不要着急…”
安装好程序后输入要转换的网盘文件分享地址,点击转换总是出现“正在处理中,耐心等候,请不要着急…”
2:转换出正确的网盘文件外链地址却无法打开.“500内部服务器错误”
有一天不知道怎么折腾,居然把程序折腾出可以正常转换网盘分享文件为绝对地址了,但是这个地址是无法打开的,返回“500内部服务器错误”提示.
3:转换出来的地址不正常
不知道又怎么折腾,程序转换出来的地址不是绝对地址了,得到的外链地址是在程序安装域名后加了两条斜杠.类似这样的地址 https://share.mybabya.com///
Liang’s Blog(凉手抚温柔):https://www.ifoouu.com/
Demo:https://share.ifoouu.com/
源码下载:https://www.ifoouu.com/note/68.html

Lighttpd的rewrite规则

url.rewrite-once = (
"^/tools/(.*)" => "/index.php?action=tools&method=$1",
"^/xiami/(.*)" => "/index.php?action=tools&method=get&out_url=xiami/$1",
"^/st/([0-9]+).mp3" => "/index.php?action=tools&method=get&out_url=st/$1",
"^/s/([0-9]+)" => "/index.php?action=tools&method=get&out_url=st/$1",
"^/([0-9]+)/(.*)?$" =>"/index.php?action=tools&method=get&out_url=$1/$2"
)

 

Nginx的rewrite规则

location ~ .*\.(jpg|swf|png|gif|JPG|ico)$
{
expires      10y;
}
location /
{
rewrite ^/tools/(.*)$ /index.php?action=tools&method=$1 last;
rewrite ^/xiami/(.*)$ /index.php?action=tools&method=get&out_url=xiami/$1 last;
rewrite ^/st/([0-9]+).mp3$ /index.php?action=tools&method=get&out_url=st/$1 last;
rewrite ^/([0-9]+)/(.*)$ /index.php?action=tools&method=get&out_url=$1/$2 last;
}

 

Apache的rewrite规则

RewriteEngine On
RewriteRule ^tools/(.*)$ index.php?action=tools&method=$1 [L]
RewriteRule ^xiami/(.*)$ index.php?action=tools&method=get&out_url=xiami/$1 [L]
RewriteRule ^st/([0-9]+).mp3$ index.php?action=tools&method=get&out_url=st/$1 [L]
RewriteRule ^([0-9]+)/(.*)$ index.php?action=tools&method=get&out_url=$1/$2 [L]

 

在添加规则后,我发现问题仍然没有解决,又以为是我修改了程序的代码改错了的问题,于是又一遍一遍的检查代码,在确认代码没有问题后又以为是服务器上的问题,因为作者凉手抚温柔的安装说明里说需要安装Memcache缓存程序,跟着又在服务器上安装了Memcache程序和php的Memcache模块.安装模块后发现问题仍然没有解决,而到这一步我已经折腾了几天了.
于是我又找到了冻猫的另一个网盘外链工具源码,在最初的安装中也出现了类似前几天的一堆问题,但是这次冻猫提醒了我,他让我打开curl模块,因为程序需要这个模块来进行下一步操作.虽然说我同样也折腾了两三天,但最终还是安装成功了.
icycat(冻猫):https://www.icycat.com/
Demo:https://www.icycat.com/baidupan
源码下载:https://www.icycat.com/tech/85.html
Lighttpd的rewrite规则

url.rewrite-once = (
"^/index.php$" => "/",
"^/(w.*)$" => "/index.php?$1",
)

 
Nginx的rewrite规则

rewrite ^/index.php$ /- last;
rewrite ^/(w.*)$ /index.php?$1 last;

 
Apache的rewrite规则

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^(w.*)$ index.php?$1 [L]

 
打开curl模块的方法,在php.ini里找到disable_functions = 有两行,在前边用;分号注释掉模块即可.但是又有两个php.ini文件需要修改,一个是当前域名下的php.ini 一个是/etc/php.ini 都把那两行注释掉,然后reboot即可.问题得到完美解决了.
呜谢:凉手抚温柔 冻猫 七目亥
演示:https://share.myzhenai.com https://share.myzhenai.com.cn https://share.haikou-china.com https://share.mybabya.com


sicnature ---------------------------------------------------------------------
Your current IP address is: 44.213.75.78
Your IP address location: 美国弗吉尼亚阿什本
Your IP address country and region: 美国 美国
Your current browser is:
Your current system is:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source http://myzhenai.com/post/1374.html

2条评论

  • 小白 2013年10月6日在10:38 下午

    楼主能不能发一份【同福客栈论坛网盘外链工具】源码给我呀???

    感觉比 凉手抚温柔 要强大一些!!!

    xo13800@163.com

  • 海南胡说 2013年10月7日在7:11 下午

    您好,我使用的这个3.0版本是冻猫不开源的,因为版权问题,所以这个版本暂时给不了您,不好意思了. 您可以用1.7的那个版本修改个UI就可以了.
    ====
    1.7版本若不能用会继续更新。
    3.0以上版本不开源,数据库缓存逻辑复杂,也没时间去帮人解决问题。写这个代码耗费了我大量精力,若实在需要新版源码,请捐助本站30元,用于本站购买流量等服务,帮助本站项目更好的发展。付款说明填写邮箱或者QQ号,我会将源码发到邮箱,提供后续更新支持。
    ====

回复 海南胡说 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注