• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Protect plesk panel 11.5 with htaccess(auth basic)

Where I can find nginx config

Code:
/usr/local/psa/admin/

NB: Do not meddle with plesk system files (this could break your plesk or even changes be overwritten on the next upgrade), unless you are sure you know what you are doing :)
 
I'm the only one with access to plesk 11.5.x on my server. For me this gives a feeling of much more security.

A todo to protect plesk with htaccess auth would be great!
 
.htaccess isnt so secure as you may think, it can too be broken ..

However, sure way would be to use the firewall module to BLOCK all access to port 8443 except for the networks you define (your own networks). The danger of this is you could easily lock your self out ..

But if you have SSH access to your server I would recommend installing CSF to do the limitations on ports and extra firewall / restrictions features that ship with it ..If you need professional support installing and configuring it, see by signature :)
 
Thanks, but my last info is:
Panel now uses nginx as the internal web server (used to host the Panel GUI) instead of lighttpd.

So I think .htaccess have nothing to do with this. A htaccess file is (only in my eyes) a bad practice. nginx not support this for performance reason, all setting must store in config file. I have disable htaccess in my vhosts.conf and set all in my vhost.conf of each domain. :)
 
Can anybody help here to protect plesk gui with a basic auth?

Where is the config file for plesk intern nginx server?


This is not working, I have test it.
In that case go to

Code:
/usr/local/psa/admin/htdocs

And password protect it ...
 
Azurel,

You can try to use next steps to get expected result:

# Create /etc/sw-cp-server/conf.d/protect-plesk.inc with content:
location / {
auth_basic "Restricted";
auth_basic_user_file /etc/sw-cp-server/conf.d/passwd;
}

# Generate passwd file
htpasswd -c /etc/sw-cp-server/conf.d/passwd admin

# Set correct permissions:
chown sw-cp-server:psaadm /etc/sw-cp-server/conf.d/passwd
chmod 640 /etc/sw-cp-server/conf.d/passwd

# Restart panel web server
/etc/init.d/sw-cp-server restart

Don't shy to ask if you need more info!
 
# Create /etc/sw-cp-server/conf.d/protect-plesk.inc with content:
location / {
auth_basic "Restricted";
auth_basic_user_file /etc/sw-cp-server/conf.d/passwd;
}

# Generate passwd file
htpasswd -c /etc/sw-cp-server/conf.d/passwd admin

# Set correct permissions:
chown sw-cp-server:psaadm /etc/sw-cp-server/conf.d/passwd
chmod 640 /etc/sw-cp-server/conf.d/passwd

# Restart panel web server
/etc/init.d/sw-cp-server restart

This working perfectly! Thank you so much. :praise:

I changed creating password to
Code:
htpasswd -cm /etc/sw-cp-server/conf.d/passwd [I]username[/I]
added parameter -m for "-m Force MD5 encryption of the password.". Default (here with me) is Crypt and not MD5. Crypt is very old and only use first 8 chars of your password. I want a very long password. :)

Thanks!
 
does this solution stay active with future updates?


Azurel,

You can try to use next steps to get expected result:

# Create /etc/sw-cp-server/conf.d/protect-plesk.inc with content:
location / {
auth_basic "Restricted";
auth_basic_user_file /etc/sw-cp-server/conf.d/passwd;
}

# Generate passwd file
htpasswd -c /etc/sw-cp-server/conf.d/passwd admin

# Set correct permissions:
chown sw-cp-server:psaadm /etc/sw-cp-server/conf.d/passwd
chmod 640 /etc/sw-cp-server/conf.d/passwd

# Restart panel web server
/etc/init.d/sw-cp-server restart

Don't shy to ask if you need more info!
 
It should stay with just minor updates...(even with major updates as long as they don't change the folder structure)
 
Back
Top