password protect site except for one page

Francis Daly francis at daoine.org
Wed Sep 17 07:10:02 UTC 2014


On Wed, Sep 17, 2014 at 11:18:43AM +1200, Steve Holdoway wrote:

Hi there,

> Does anyone have a nifty solution for this? The problem is that it's a
> wordpress site, so just 
> 
> location / {
> 	auth_basic		"Coming soon...";
> 	auth_basic_user_file	/etc/nginx/security/lock;
> 	...
> }
> 
> location /demo {
> 	auth_basic		off;
> 	...
> }
> 
> doesn't work for /demo due to static content, etc.

location /static {} ?

What are the urls that you do want to password-protect, and what are
the urls that you do not want to password-protect?

("one page" appears not to be "one url".)

Alternatively, could you put all of your "demo" content below /demo?

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list