Hi ,all .

how to compile nginx who has ability of basic auth using ports ?

according to http://wiki.nginx.org/Modules ,
  if auth_basic is not wanted,
          compile nginx --without-http_auth_basic_module .
---
i need basic auth because of family privacy photos ,
   i run nginx on arch linux  out of need .

nginx.conf is
worker_processes  1;
events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

# ----local
server {
    listen       80;
    server_name  localhost;
    root     /mnt-nginx/d3;
    index  index.html index.htm;
    auth_basic "Restricted";
    auth_basic_user_file /etc/nginx/13/.htpasswd;
                        ##### 13 insted of require
        }

#---------open-------------------------mydns
    server {
        listen       80;
        server_name  a.mydns.jp;
        root   /mnt-nginx/d1;
        index  index.html index.htm;
           }

#---------basic auth-----------------------ddns
    server {
    listen       80;
    server_name  s.sun.ddns.vc;
    root     /mnt-nginx/htdocs/Fam;
    index  index.html index.htm;
    auth_basic "Restricted";
    auth_basic_user_file /etc/nginx/1/.htpasswd;
                        ##### 1 insted of require
      }
}
---
tuyosi

Reply via email to