如何禁用的cPanel网址 [英] How to disable cPanel URLs
问题描述
我使用的cPanel主办我的网站。我注意到,如果任何人谁访问我的网站恰好是一个Web开发人员,他可以随时通过 mydomain.com:2082 mydomain.com/cpanel 等。最好是不要让访客知道我用的控制面板。我想禁用这些URL。要自己登录的cPanel,我会用我的虚拟主机提供的备用网址这是像 a.myhost.com/cpanel
I use cPanel for hosting my website. I have noticed that if anyone who visits my website happens to be a web developer, he can always reach my cPanel Login page via mydomain.com:2082, mydomain.com/cpanel, etc.. It is better to not let the visitors know what control panel I use. I want to disable these URLs. To myself log in to cpanel, I will use the alternate URL provided by my Web Host which is something like a.myhost.com/cpanel.
作为一个工作的时候,我也改变了主域名并添加我的主要网站为插件域。但是,即使没有工作和 addondomain.com:2082 和 addondomain.com/cpanel 露面的cPanel登录,我能够登录使用存在的cPanel用户名和密码
As a work around, I also changed the main domain and added my main website as an addon domain. But even that didn't work and addondomain.com:2082 and addondomain.com/cpanel showed up the cpanel login and I was able to login there using cpanel username and password.
请帮我向公众隐瞒世界这些网页。至少 addondomain.com:2082 或 addondomain.com/cpanel 应该抛出404(preferable)或403或任何东西。
Please help me hide these pages from the public world. At least addondomain.com:2082 or addondomain.com/cpanel should throw a 404(preferable) or 403 or anything.
我使用的cPanel 11 / X3。
I use cPanel 11/x3.
甚至我的托管服务提供商是不是能够帮助我。如果谁知道这事,或实现这一点,请帮助我。
Even my hosting provider is not able to help me with this. Anybody who know anything about this, or implemented this, please help me.
在此先感谢....
推荐答案
更改默认的cPanel端口。
的cPanel端口可以在/var/cpanel/cpanel.config文件进行更改。
The cPanel port can be changed in /var/cpanel/cpanel.config file.
只需更改端口= 2082(位于配置文件),以其他任何东西。
Just change port=2082 (located in the config file) to anything else.
然后运行以下命令,以使更改生效。
Then running the following commands for the changes to take effect.
/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings
/etc/init.d/httpd restart
更改/删除默认的cPanel网址。
对于/的WHM和/的cPanel网址,删除/修改位于/usr/local/apache/conf/httpd.conf文件中的这些线或类似的匹配行:
For the /whm and /cpanel urls, remove/change these lines or similar matched lines located on the /usr/local/apache/conf/httpd.conf file:
ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
然后运行以下命令,以使更改生效。
Then run the following commands for the changes to take effect.
/usr/local/cpanel/bin/apache_conf_distiller --update
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
<一个href=\"http://forums.cpanel.net/f5/ask-rename-cpanel-whm-become-newname-226501.html#post933932\">Source更多信息
这篇关于如何禁用的cPanel网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!