Matching server host name in location directive

antituhan dewanggaba at
Mon Jul 18 07:30:07 MSD 2011

I prefer to use individual config for each site, 


include /etc/nginx/sites-enabled/*;


server {
          listen       80;

  location {
          auth_basic "Admin Login";
         auth_basic_user_file /etc/nginx/.htpasswd;


Just my 2 cent :) It's helpful for me

View this message in context:
Sent from the nginx mailing list archive at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list