hi,all .

i use name based virtual host (=server block).
i want to run first site as open  and second site as ristricted (basic
auth),
but it is hard to do and there is little information on internet about this
.

----
it is easy to run only name based virtualhost (=server block) .
nginx.conf is next .

worker_processes  1;
worker_rlimit_nofile 1024;
events {
    worker_connections  800;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    index         index.html index.htm;
    keepalive_timeout  65;
    server_tokens off;

   server {
        listen       80;
        listen       [::]:80;
        server_name  a.mydns.jp;   <--- 1st site
        root         /var/www/htdocs/d1;
}

   server {
        listen       80;
        listen       [::]:80;
        server_name  s.sun.ddns.vc; <--- 2nd site
        root         /var/www/htdocs/d2;
          }
    }
---

give me some hints .

Reply via email to