Author Topic: How to disable Phpmyadmin, webmail and webhosting panel login page for one domai  (Read 1943 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Hi;

How to disable Phpmyadmin, webmail and webhosting panel login page for one domain/account?

Offline
*****
You should be able to remove this code from the relevant virtual host config file:
Code: [Select]
  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


Offline
*
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.
« Last Edit: January 30, 2023, 09:25:12 AM by comokoko »

Offline
*****
You would also have to delete this section of the vhost conf (/usr/local/apache/conf.d/vhosts/yourdomain.com.conf):
Code: [Select]
<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.)