Preview User¶
To control public access to a website, for example, before release, we provide password protection that is configurable directly in the website’s settings in Cockpit.
Through this setting, everyone with access to the Cockpit customer can enable or disable password protection for a certain website without having to access the server and adjust and reload its configuration.
Activation¶
You can enable password protection by checking Enable password protection in Cockpit. Then, select your desired username and password, or generate a random password by using the Generate button.
Additional Users¶
To add additional users for all websites on a given server, or all websites
for a given customer, you can set the website::users
hash within the
Custom JSON Server Level Configuration.
You can use those users for yourself and your co-workers to log in to all protected websites without having to remember the password for each individual one.
{
"website::users": {
"alice": {
"preview": "$apr1$RXDs3l18$w0VJrVN5uoU6DMY.0xgTr/"
},
"bob": {
"preview": "$apr1$RSDdas2323$23case23DCDMY.0xgTr/"
}
}
}
Tip
The passwords configured here must be hashed with the crypt, apr1 or SSHA algorithm