• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question IP Whitelist or Password

thedome

New Pleskian
Hi,

Is it possible that we secure the sub-/domains via "protected directories" or via the IP?
So that you either communicate from a certain IP or have to enter a user/password?
(Without using custom .htaccess and .htpasswd!)

greetings
 
However, with the solutions mentioned, protection cannot be ruled out.

I would like to be able to access the site from the office (static IP) without having to enter a password and to use the directory protection from outside connections.
 
It would be nice to have an option to allow specific IPs to bypass the basic auth.
This would be helpful not only for every, by basic auth, protected WordPress site because WordPress needs to connect to it self. In addition there are some external services that need to connect to the site and don't support password protected sites. Unfortunately using https://user:[email protected] doesn't work in our use cases, too.
Why not offering the option to add IP addresses in addition to adding users?
 
It would be nice to have an option to allow specific IPs to bypass the basic auth.
This would be helpful not only for every, by basic auth, protected WordPress site because WordPress needs to connect to it self. In addition there are some external services that need to connect to the site and don't support password protected sites. Unfortunately using https://user:[email protected] doesn't work in our use cases, too.
Why not offering the option to add IP addresses in addition to adding users?
You could configure your own password protected directory using the build in mechanisms of either apache or nginx. That would allow you whitelist any ip.

For example with .htaccess file:
Apache config:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /var/www/vhosts/example.com/.htpasswd
Require valid-user
Order deny,allow
Deny from all
Allow from 123.123.123.123
Satisfy any

Or with nginx (add to additional nginx directives of domain)
NGINX:
location ~ ^/.* {
    satisfy any;

    allow 123.123.123.123;

    auth_basic "Restricted Area";
    auth_basic_user_file "/var/www/vhosts/example.com/.htpasswd";
}
 
Thanks @Kaspar this is a workaround that could do it's job.

But:
  1. this requires access to the Web-Server-Settings
  2. on nginx it does not match to `location /`. Instead a `location ~ ^/.*` is used to avoid duplicate locations, what could cause other problems (loosing settings of `location /`)
  3. you'll have to create and manage the .htpasswd file manually, what isn't that smooth as using the Plesk UI.
 
Back
Top