Control Web Panel
Other => Other => Topic started by: comokoko on January 27, 2023, 10:36:50 AM
-
Hi;
How to disable Phpmyadmin, webmail and webhosting panel login page for one domain/account?
-
You should be able to remove this code from the relevant virtual host config file:
ProxyPassReverse / http://127.0.0.1:2095/
RewriteRule ^/roundcube$ /roundcube/ [R]
ProxyPass /roundcube/ https://127.0.0.1:2031/roundcube/
ProxyPassReverse /roundcube https://127.0.0.1:2031/roundcube/
RewriteRule ^/pma$ /pma/ [R]
ProxyPass /pma/ https://127.0.0.1:2031/pma/
ProxyPassReverse /pma https://127.0.0.1:2031/pma/
ProxyPass / https://127.0.0.1:2083/
ProxyPassReverse / https://127.0.0.1:2083/
This wouldn't stop them from accessing the server IP address with those ports, however:
https://111.111.111.111/pma
https://111.111.111.111:2031/pma
https://111.111.111.111:2083
http://111.111.111.111:2095
https://111.111.111.111:2096
-
Thanks.
But webmail.domain.com still work (With roundcube login interface) How to disable it?
NOTE: I'm delete ServerName webmail.domain.com line from vhost file and restart apache but still work.
-
You would also have to delete this section of the vhost conf (/usr/local/apache/conf.d/vhosts/yourdomain.com.conf):
<VirtualHost 111.111.111.111:80>
ServerName webmail.yourdomain.com
<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
ProxyPass / http://127.0.0.1:2095/
ProxyPassReverse / http://127.0.0.1:2095/
<Proxy *>
AllowOverride All
</Proxy>
</IfModule>
<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
</VirtualHost>
(For completeness, you do this for both the plain .conf and the .ssl.conf files.)