kb: how-to
Plesk for Linux
Question
How to restrict access to webmail.example.com for all IP except one?
Answer
- Connect to the server via SSH
- 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
- 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> - 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.
Comments
Please sign in to leave a comment.