• 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.

Protect Plesk panel with htpasswd and htaccess

A

AlessioF

Guest
Hello,
I'm trying to protect the access to the Plesk Panel with an htpasswd file, but I can't seem to make it work.
I've created a .htaccess file in /opt/psa/admin/htdocs directory (which is for me the panel directory) but anything I put in that htaccess file it's ignored. What am I doing wrong? Is there a way to do this from inside the Plesk panel or is my method the right one?
Thank you
 
Found a Solution...

Plesk 9+ is based on Lighttpd, so you have to add the following in

# Limit access to Admin
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/opt/psa/admin/htdocs/.htpasswd"
auth.require = ( "/" =>
(
"method" => "basic",
"realm" => "Rocket-Guyana",
"require" => "valid-user"
),
)

/etc/sw-cp-server/applications.d/plesk.socket.sh -> eg. after the fastcgi section

then add "mod_auth" to the first line in plesk.conf and restart the server /etc/init.d/sw-cp-server restart

Hope it helps. I post the solution for other ppl so they can apply the same.

--
Frank
 
What's the reason of doing this?

Plesk already has its own auth form. If you're a hoster you will start forcing customers to enter passwords twice. Or you don't give an access to the control panel to your customers?

If you want to prohibit the access to the panel for everybody excepting you, you can use Firewall module (or iptables directly). If you want to restrict an admin access, you can take a look at Tools & Settings -> IP access restriction management.
 
thinkt about it and you might find it an easy way to stuff a potential security risk (plesk control panel). This way it is relatively save from any sort of panel script attack. iptables is ip/protocol based, this user/pass is more suitable for a lot of people and a no go for automated script hacks etc.
 
I'm trying to understand how do you use the panel? Do you have clients or use it for personal purpose. If you have clients, do they enter passwords twice (first time due to htpasswd, second in Plesk auth form)? Looks like adding of htpasswd can be useful only if you use the panel only for personal purposes.
 
Big Thanks! Its working fine in 11.0.9, but after update to 11.5.30 this path not exist:
/etc/sw-cp-server/applications.d/plesk.socket.sh

Is here a way to add htaccess for 11.5.30? :)

EDIT:
http://download1.parallels.com/Plesk/PP11/11.1/release-notes/parallels-plesk-panel-11.1-for-linux-based-os.html said:
Panel now uses nginx as the internal web server (used to host the Panel GUI) instead of lighttpd.
 
Last edited:
Back
Top