Hi,
I hope someone has an easy answer for this one.
I have a cPanel/WHM VPS and I am trying to remove just the subdomain for whm.mainserverdomain.com - forcing access only via port 2086/2087 - so I can access list port 2086/2087 in the firewall.
I want to leave the cpanel. webmail. subdomains functional.
I've been trying to do this with these 2 options in Tweak Settings in WHM:
1. Add proxy VirtualHost to httpd.conf to automatically redirect unconfigured cpanel, webmail, webdisk and whm subdomains to the correct port (requires mod_rewrite and mod_proxy)
2. Automatically create cpanel, webmail, webdisk and whm proxy subdomain DNS entries for new accounts. When this is initially enabled it will add appropriate proxy subdomain DNS entries to all existing accounts. (Use /scripts/proxydomains to reconfigure the DNS entries manually)
As soon as I uncheck the "unconfigured" option all the cpanel. and webmail. subdomains for all domains hosted stop working.
Obviously when I check it, whm.mainserverdomain.com comes back to life.
I have tried /scripts/proxydomains remove --domain=mainserverdomain.com and /scripts/proxydomains remove --subdomain=whm but all this seems to achieve is to remove the A records, leaving the apache rewrite directives active.
That means that all someone has to do is add a local hosts file entry to their machine for whm.mainserverdomain.com to be able to access WHM via port 80.
Commenting out the rewrites for whm. in httpd.conf solves it - but those changes are regularly overwritten automagically.
The comment in httpd.conf advises to amend the include file - but for the life of me I can't find where or which include file I need amend.
Any help or pointers gratefully received.
Many thanks
Graham
I hope someone has an easy answer for this one.
I have a cPanel/WHM VPS and I am trying to remove just the subdomain for whm.mainserverdomain.com - forcing access only via port 2086/2087 - so I can access list port 2086/2087 in the firewall.
I want to leave the cpanel. webmail. subdomains functional.
I've been trying to do this with these 2 options in Tweak Settings in WHM:
1. Add proxy VirtualHost to httpd.conf to automatically redirect unconfigured cpanel, webmail, webdisk and whm subdomains to the correct port (requires mod_rewrite and mod_proxy)
2. Automatically create cpanel, webmail, webdisk and whm proxy subdomain DNS entries for new accounts. When this is initially enabled it will add appropriate proxy subdomain DNS entries to all existing accounts. (Use /scripts/proxydomains to reconfigure the DNS entries manually)
As soon as I uncheck the "unconfigured" option all the cpanel. and webmail. subdomains for all domains hosted stop working.
Obviously when I check it, whm.mainserverdomain.com comes back to life.
I have tried /scripts/proxydomains remove --domain=mainserverdomain.com and /scripts/proxydomains remove --subdomain=whm but all this seems to achieve is to remove the A records, leaving the apache rewrite directives active.
That means that all someone has to do is add a local hosts file entry to their machine for whm.mainserverdomain.com to be able to access WHM via port 80.
Commenting out the rewrites for whm. in httpd.conf solves it - but those changes are regularly overwritten automagically.
The comment in httpd.conf advises to amend the include file - but for the life of me I can't find where or which include file I need amend.
Any help or pointers gratefully received.
Many thanks
Graham