Articles in this section

How to limit access to a webmail in Plesk to a specific IP?

kb: how-to Plesk for Linux

Question

How to restrict access to webmail.example.com for all IP except one? 

Answer

    1. Connect to the server via SSH
    2. Open the corresponding configuration file in any text editor (vi, for example): 
      For Debian-based distributions:

      # vi /etc/httpd/conf/plesk.conf.d/webmails/example.com_webmail.conf

      for For RHEL-based distributions:

      # vi /etc/apache2/plesk.conf.d/webmails/example.com_webmail.conf

    3. Add the following options inside each VirtualHost section:

      <VirtualHost 203.0.113.2:7080 127.0.0.1:7080>
      ...
      <Location />
      Order deny,allow
      Allow from 10.33.110.178
      Deny from all
      </Location>
      ...
      </VirtualHost>

    4. Restart web-server:
      For Debian-based distributions:

      # service apache2 restart

      for For RHEL-based distributions:

      # service httpd restart

Note: the settings will be removed in case of Plesk update or domain's reconfiguration.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.