0

是否可以使用基本身份验证保护来保护 plesk panel 11.5.30 GUI?

11.5.30 用作内部网络服务器 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中添加基本身份验证的简单示例?

4

2 回答 2

1

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
于 2013-10-01T13:24:00.443 回答
0

Plesk 面板服务器的配置存储在 /etc/sw-cp-server/conf.d/plesk.conf

此配置 /etc/nginx/plesk.conf.d/server.conf 它是端口 80 上的公共 Web 服务器的配置。

于 2013-10-01T12:11:59.270 回答