Matching server host name in location directive

antituhan dewanggaba at gmail.com
Mon Jul 18 07:30:07 MSD 2011


I prefer to use individual config for each site, 

nginx.conf

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


/etc/nginx/sites-enable/somesite.conf

server {
          listen       80;
          server_name  x.domain.com;

  location x.domain.com {
          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: http://nginx.2469901.n2.nabble.com/Matching-server-host-name-in-location-directive-tp6548405p6593276.html
Sent from the nginx mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110717/e96d63e0/attachment.html>


More information about the nginx mailing list