Tags: , , , 228, Posted in 开源盛试 我抢沙发

今天,
有个叫Jimmy Shadow的家伙,购买了一个基于cPanel管理的虚拟空间,不过,他无法通过2082端口访问CP,据说是因为位于校园网络后面,我想应该是防火墙的问题。

于是21使用GG大神经过一番搜寻,找到一个工具:cPanel Proxy
它的工作原理就是通过Apache的Rewrite规则,将2082端口的访问重定向到一个PHP脚本上,经过试用,效果明显。

大概安装方法如下:(选自liewonheart.com。)

  1. 通过Web代理登录你的cPanel;
  2. 在Addon Domain(域名附加)模块为你的域名增加一个叫“cpanel”子站点绑定,目录为 /public_html/cpanel/ ;
  3. 在域名所属的DNS增加这个记录并指向你的空间IP(如果域名和空间是一块儿买的,那就不需此步);
  4. 下载cPanel Proxy(感谢myplacedk写了这个脚本)。
  5. 上传cPanelProxy.zip里的所有文件到你的 /public_html/cpanel/ 目录。
    (21注:或者是/www/cpanel/,也有可能是/cpanel/,根据你的实际情况而定)
  6. 编辑并上传包含以下内容的.htaccess文件到你的/public_html/cpanel/目录(之前下载的文件包里也有):
    1
    2
    3
    
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/cpanelproxy.php
    RewriteRule .* /cpanelproxy.php [last]

    注:如果你的网络无法使用FTP工具,你可以考虑net2ftp

  7. 完成了,访问 cpanel.yourdomain.com 即可对你的cPanel进行任何动作了,嘿嘿~

以下是引用来源的原文:

From: liewonheart.com

After my hosting order has been confirmed, I cannot enter cPanel either by http://mydomain/cpanel, http://mydomain:2082/ (port 2082) or by http://ip-address/cpanel. Firefox and IE showed disappointing error messages “The connection has timed out.” and “The page cannot be displayed.” respectively.

Then I asked my web host to assist me, but they replied “cPanel of your account is loading fine here”. What?! I was baffled at first, but later I discovered that actually i was behind a strict firewall – it blocked my connection!

Okay, if you are facing the same problem, please take a look at the solutions below.

Firstly, look for a web proxy.
Proxy helps you bypass firewall. Google “web proxy” now and you will have a bundle of choices. Alternatively, you can use FoxyProxy or similar add-ons in Firefox.

However, it is quite inconvenience if everytime we need to enter web proxy page before getting into cPanel. And also, proxy might leak information about our computer – compromising our anonymity. Many proxies unknowingly reveal our browser information and referring websites. Some of them even expose our real IP address.

That’s why cPanel proxy comes in.
Load cPanel via web proxy.
Add a subdomain, called it “cpanel”.
Download cPanel proxy (Thanks to myplacedk for writing the script!)
Upload the script cpanelproxy.php to the /public_html/cpanel/ directory.
If firewall blocks your FTP tools (like File Zilla), you can use web ftp net2ftp or FireFTP in Firefox.
Modify/upload the file .htaccess /public_html/cpanel/ to include the following 3 lines:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/cpanelproxy.php
RewriteRule .* /cpanelproxy.php [last]

If Windows doesn’t allow you to rename the file as .htaccess (because file is not allowed to have no name), do it in your server.

What’s next?
That’s it! Now use cpanel.yourdomain.com to log in cPanel.

October 10, 2008