Disable mysite.tld/whm And mysite.tld/cpanel Shortcuts?
Hi, is it possible to disable the mysite.tld/whm and mysite.tld/cpanel shortcuts?
-
Hello :) Could you elaborate on how you would prefer they are disabled? Is it just the redirects you want to disable, and not the ports? Or, are you attempting to limit access based on IP address? Thank you. 0 -
It's the redirects I want disabled. I want a 404 Not found error when someone does mysite.tld/whm, mysite.tld/cpanel, or mysite.tld/webmail. I'd like to use different ports for WHM and cpanel but after googling I don't think that's going to be possible in an easy way - so nm that. The reason I'd like the redirects disabled is I'm putting the site under Cloudflare, and disabling all non-html ports through it. But if those redirects are there I think it might things up. I plan to just access WHM/CPanel via IP address. 0 -
This is discussed in the following thread: Disable /cpanel URL Thank you. 0 -
The solution in that thread didn't work for me unfortunately because for some reason the distiller does not work for me. Any idea why the distiller wouldn't work for me? Is there some way to remove these lines using templates? ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi 0 -
Yes, another viable method explained in this post involves modifying the Apache template files: Remove /webmail entry Thank you. 0 -
Thanks removing these lines from main.local worked. [PHP][% FOREACH dir IN main.scriptaliasmatch.items -%] ScriptAliasMatch [% dir.regex %] [% dir.path %] [% END -%][/PHP] I rebuilt apache and everything survived. It took me a while to realize I had to clear all browser history and data though to make it work. I guess the redirects were saved in the browser. 0 -
I am happy to see that solution was helpful. Thank you for updating us with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
7 comments