-
Notifications
You must be signed in to change notification settings - Fork 256
Security
Mark Friedrich edited this page Aug 3, 2016
·
1 revision
When you are done with the setup process, you probably want to protect the /setup
path from being accessible by other users.
location /setup {
auth_basic "Setup Login";
auth_basic_user_file /etc/nginx/.setup_pass;
try_files $uri $uri/ /index.php?$query_string;
}
$ htpasswd -c /etc/nginx/.setup_pass username
When you run the above command, it will prompt you for a password for the provided username, and then create the file .htpasswd in the folder you specified. If you already have a pre-existing password file, you can omit the -c flag. You can use the -D flag to remove the specified user from a password file.