Use multiple password files for nginxIn Nginx, how can I rewrite all http requests to https while maintaining...
Making a sword in the stone, in a medieval world without magic
What happens with multiple copies of Humility and Glorious Anthem on the battlefield?
Examples of odd-dimensional manifolds that do not admit contact structure
Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?
Co-worker team leader wants to inject the crap software product of his friends into our development. What should I say to our common boss?
Humans have energy, but not water. What happens?
Why must traveling waves have the same amplitude to form a standing wave?
Touchscreen-controlled dentist office snowman collector game
Question about partial fractions with irreducible quadratic factors
How to deal with a cynical class?
Draw arrow on sides of triangle
What is the difference between "shut" and "close"?
Life insurance that covers only simultaneous/dual deaths
Do f-stop and exposure time perfectly cancel?
Coworker uses her breast-pump everywhere in the office
It's a yearly task, alright
Counter-example to the existence of left Bousfield localization of combinatorial model category
Does Linux have system calls to access all the features of the file systems it supports?
Excess Zinc in garden soil
Does anyone draw a parallel between Haman selling himself to Mordechai and Esav selling the birthright to Yaakov?
Can the druid cantrip Thorn Whip really defeat a water weird this easily?
Decoding assembly instructions in a Game Boy disassembler
How could a female member of a species produce eggs unto death?
Deleting missing values from a dataset
Use multiple password files for nginx
In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?Tips for maximizing Nginx requests/sec?How to rate-limit concurrent sessions with nginx or haproxy?nginx: How can I set proxy_* directives only for matching URIs?Server crashing after Wordpress upgrade to latest version (nginx+php-fpm)Why does passenger-install-nginx-module neither install Nginx nor implement Passenger support on Centos7 while the output indicates the contrary?Multiple versions of PHP through nginxNginx, with multiple forwarded domains and a letsencrypt certificateduplicates after configuring multiple domains and subdomains + using certbot - seeking best practiceWordPress with Nginx and Cloudflare
I have multiple server
blocks in my config, all of them using the same file as auth_basic_user_file
. Now we started to work with some external workforce, and we’d like to add some extra users to one of the server
blocks, while keeping the original ones, too. Although the documentation doesn’t state it, using multiple auth_basic_user_file
is not allowed.
Is there a way to do this, without manually merging the password files together? I’m using nginx 1.11.5
nginx
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have multiple server
blocks in my config, all of them using the same file as auth_basic_user_file
. Now we started to work with some external workforce, and we’d like to add some extra users to one of the server
blocks, while keeping the original ones, too. Although the documentation doesn’t state it, using multiple auth_basic_user_file
is not allowed.
Is there a way to do this, without manually merging the password files together? I’m using nginx 1.11.5
nginx
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have multiple server
blocks in my config, all of them using the same file as auth_basic_user_file
. Now we started to work with some external workforce, and we’d like to add some extra users to one of the server
blocks, while keeping the original ones, too. Although the documentation doesn’t state it, using multiple auth_basic_user_file
is not allowed.
Is there a way to do this, without manually merging the password files together? I’m using nginx 1.11.5
nginx
I have multiple server
blocks in my config, all of them using the same file as auth_basic_user_file
. Now we started to work with some external workforce, and we’d like to add some extra users to one of the server
blocks, while keeping the original ones, too. Although the documentation doesn’t state it, using multiple auth_basic_user_file
is not allowed.
Is there a way to do this, without manually merging the password files together? I’m using nginx 1.11.5
nginx
nginx
asked Nov 30 '16 at 12:05
GergelyPolonkaiGergelyPolonkai
2091411
2091411
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 10 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
yes, this is possible. See http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html
Create a separate password file for the server that should have multiple users. Within the
server
block that should have multiple auth users setauth_basic_user_file
path to this new password file.
Insert the original and the additional user info in new password file like this:
name1:password1
name2:password2
Don't forget to test and reload nginx config:
nginx -t
service nginx reload
1
So you suggest to copy the old password file and add the extra accounts to it? Because that’s exactly what I want to avoid, as if a new intern or employee arrives I have to add their accounts to two files.
– GergelyPolonkai
Feb 12 '18 at 16:09
Sorry, I misunderstood your requirements. I thougt the hint you needed was that password files can handle more than one user. Other options that might better fit your needs could be: a) Build nginx with Auth Digest module. b) Create user and group text files and a script to combine them to single password files for each server after a user change. More info for both options see here
– Bob
Feb 12 '18 at 16:49
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f817876%2fuse-multiple-password-files-for-nginx%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
yes, this is possible. See http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html
Create a separate password file for the server that should have multiple users. Within the
server
block that should have multiple auth users setauth_basic_user_file
path to this new password file.
Insert the original and the additional user info in new password file like this:
name1:password1
name2:password2
Don't forget to test and reload nginx config:
nginx -t
service nginx reload
1
So you suggest to copy the old password file and add the extra accounts to it? Because that’s exactly what I want to avoid, as if a new intern or employee arrives I have to add their accounts to two files.
– GergelyPolonkai
Feb 12 '18 at 16:09
Sorry, I misunderstood your requirements. I thougt the hint you needed was that password files can handle more than one user. Other options that might better fit your needs could be: a) Build nginx with Auth Digest module. b) Create user and group text files and a script to combine them to single password files for each server after a user change. More info for both options see here
– Bob
Feb 12 '18 at 16:49
add a comment |
yes, this is possible. See http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html
Create a separate password file for the server that should have multiple users. Within the
server
block that should have multiple auth users setauth_basic_user_file
path to this new password file.
Insert the original and the additional user info in new password file like this:
name1:password1
name2:password2
Don't forget to test and reload nginx config:
nginx -t
service nginx reload
1
So you suggest to copy the old password file and add the extra accounts to it? Because that’s exactly what I want to avoid, as if a new intern or employee arrives I have to add their accounts to two files.
– GergelyPolonkai
Feb 12 '18 at 16:09
Sorry, I misunderstood your requirements. I thougt the hint you needed was that password files can handle more than one user. Other options that might better fit your needs could be: a) Build nginx with Auth Digest module. b) Create user and group text files and a script to combine them to single password files for each server after a user change. More info for both options see here
– Bob
Feb 12 '18 at 16:49
add a comment |
yes, this is possible. See http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html
Create a separate password file for the server that should have multiple users. Within the
server
block that should have multiple auth users setauth_basic_user_file
path to this new password file.
Insert the original and the additional user info in new password file like this:
name1:password1
name2:password2
Don't forget to test and reload nginx config:
nginx -t
service nginx reload
yes, this is possible. See http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html
Create a separate password file for the server that should have multiple users. Within the
server
block that should have multiple auth users setauth_basic_user_file
path to this new password file.
Insert the original and the additional user info in new password file like this:
name1:password1
name2:password2
Don't forget to test and reload nginx config:
nginx -t
service nginx reload
answered Feb 12 '18 at 15:34
BobBob
32614
32614
1
So you suggest to copy the old password file and add the extra accounts to it? Because that’s exactly what I want to avoid, as if a new intern or employee arrives I have to add their accounts to two files.
– GergelyPolonkai
Feb 12 '18 at 16:09
Sorry, I misunderstood your requirements. I thougt the hint you needed was that password files can handle more than one user. Other options that might better fit your needs could be: a) Build nginx with Auth Digest module. b) Create user and group text files and a script to combine them to single password files for each server after a user change. More info for both options see here
– Bob
Feb 12 '18 at 16:49
add a comment |
1
So you suggest to copy the old password file and add the extra accounts to it? Because that’s exactly what I want to avoid, as if a new intern or employee arrives I have to add their accounts to two files.
– GergelyPolonkai
Feb 12 '18 at 16:09
Sorry, I misunderstood your requirements. I thougt the hint you needed was that password files can handle more than one user. Other options that might better fit your needs could be: a) Build nginx with Auth Digest module. b) Create user and group text files and a script to combine them to single password files for each server after a user change. More info for both options see here
– Bob
Feb 12 '18 at 16:49
1
1
So you suggest to copy the old password file and add the extra accounts to it? Because that’s exactly what I want to avoid, as if a new intern or employee arrives I have to add their accounts to two files.
– GergelyPolonkai
Feb 12 '18 at 16:09
So you suggest to copy the old password file and add the extra accounts to it? Because that’s exactly what I want to avoid, as if a new intern or employee arrives I have to add their accounts to two files.
– GergelyPolonkai
Feb 12 '18 at 16:09
Sorry, I misunderstood your requirements. I thougt the hint you needed was that password files can handle more than one user. Other options that might better fit your needs could be: a) Build nginx with Auth Digest module. b) Create user and group text files and a script to combine them to single password files for each server after a user change. More info for both options see here
– Bob
Feb 12 '18 at 16:49
Sorry, I misunderstood your requirements. I thougt the hint you needed was that password files can handle more than one user. Other options that might better fit your needs could be: a) Build nginx with Auth Digest module. b) Create user and group text files and a script to combine them to single password files for each server after a user change. More info for both options see here
– Bob
Feb 12 '18 at 16:49
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f817876%2fuse-multiple-password-files-for-nginx%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown