WebFaction
Community site: login faq

I just set up a development domain that I would like to password protect. It is implemented with a 'custom app listening to a port', Gunicorn and Django.

I put my nginx.conf file here:

/home/uid/webapps/domain/nginx/conf/nginx.conf

I see that the file is parsed because I get an 502 if I misconfigure it. However, regardless of what type of directives I add they seem to not be applied.

server {
   deny all;
   auth_basic "Restricted";
   auth_basic_user_file /home/uid/webapps/domain/nginx/conf/.htpasswd;
}

Anybody have an idea what I may have done wrong?

asked 05 Apr '15, 18:04

rolfb
11
accept rate: 0%

I'm not particularly familiar with auth_basic in nginx, but from the documentation example it seems that it should be placed in a location section (such as in "location /"). Is this perhaps the problem?

(06 Apr '15, 06:24) ryans ♦♦

I was not able to figure it out, but after some more research I determined that using the 'django-lockdown' module would be a better solution anyways.

permanent link

answered 07 Apr '15, 05:55

rolfb
11
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×3
×2

question asked: 05 Apr '15, 18:04

question was seen: 1,217 times

last updated: 07 Apr '15, 05:55

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM