skip to Main Content

Is it possible to protect plesk panel 11.5.30 GUI with a basic auth protection?

11.5.30 use as internal web server nginx. I founded this file:
/etc/nginx/plesk.conf.d/server.conf

but its not allowed to edit:

ATTENTION!
DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.

Have here anyone a simple example to add basic auth to plesk GUI?

2

Answers


  1. Chosen as BEST ANSWER

    This is the correct way (original posted by SergeyUgdyzhekov)

    # 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

  2. Plesk panel server’s config stored in /etc/sw-cp-server/conf.d/plesk.conf

    This config /etc/nginx/plesk.conf.d/server.conf it’s a config of public web server on port 80.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search