今天,
有个叫Jimmy Shadow的家伙,购买了一个基于cPanel管理的虚拟空间,
不过,他无法通过2082端口访问CP,据说是因为位于校园网络后面,
我想应该是防火墙挡住他的访问。
经过GG大神的搜寻,找到一个工具:cPanel proxy。
它的工作原理就是通过Apache的Rewrite规则,将一个访问重写到自编的一个PHP脚本上。
经过试验,使用有效。
大概安装方法如下:(选自liewonheart.com。)
- 通过Web代理访问你的cPanel。
(L21注:我不明白是什么意思,可能是确认你的CP是否工作吧) - 为你的域名增加一个叫“cpanel”的A记录(子域名)
- 下载cPanel proxy。(感谢myplacedk写了这个脚本)
- 上传到cPanel proxy你的/public_html/cpanel/目录。
(L21注:或者是/www/cpanel/,也有可能仅仅是/cpanel/,根据你的实际情况而定),
如果你的防火墙禁止使用FTP工具,你可以考虑net2ftp或FireFTP(用于FireFox)。 - 编辑并上传包含一下内容的.htaccess文件到你的/public_html/cpanel/目录(实际上下载的文件包里面已经有了):
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/cpanelproxy.php
RewriteRule .* /cpanelproxy.php [last]
点击查看原文:
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.