是否可以使用基本身份验证保护保护plesk panel 11.5.30 GUI?
11.5.30用作内部Web服务器nginx。我创建了这个文件: /etc/nginx/plesk.conf.d/server.conf
但不允许编辑:
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.
这里有没有一个简单的例子可以将基本身份验证添加到plesk GUI ?
答案 0 :(得分:1)
这是正确的方式(由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
答案 1 :(得分:0)
Plesk面板服务器的配置存储在/etc/sw-cp-server/conf.d/plesk.conf
这个配置/etc/nginx/plesk.conf.d/server.conf它是端口80上的公共Web服务器的配置。