しょうがないので
http://wiki.nginx.org/OnOpenBSD
のとおりにする。
http://nginx.org/download/nginx-1.9.0.tar.gz
$ ./configure --sbin-path=/usr/local/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --with-http_ssl_module --http-log-path=/var/log/nginx.log --error-log-path=/var/log/nginx-error.log --http-fastcgi-temp-path=/var/tmp/fastcgi_tmp --http-proxy-temp-path=/var/tmp/proxy_tmp --http-client-body-temp-path=/var/tmp/client_body_temp --with-http_stub_status_module --user=www --group=www
Compile and install
$ make && sudo make install
後は 以下の用にした。
ls -l /var/www/
total 28
drwx------ 2 www wheel 512 Apr 11 00:06 0
drwx------ 2 www wheel 512 May 13 01:42 1
drwx------ 2 www wheel 512 Apr 11 00:06 11
drwx------ 2 www wheel 512 Apr 11 00:06 12
drwx------ 2 www wheel 512 Apr 11 00:06 2
lrwxr-xr-x 1 www wheel 8 May 13 02:06 d0 -> /SAVE/d0
lrwxr-xr-x 1 www wheel 8 May 13 02:05 d1 -> /SAVE/d1
lrwxr-xr-x 1 www wheel 9 May 13 02:06 d11 -> /SAVE/d11
lrwxr-xr-x 1 www wheel 9 May 13 02:06 d12 -> /SAVE/d12
lrwxr-xr-x 1 www wheel 8 May 13 02:06 d2 -> /SAVE/d2
drwxr-xr-x 3 www wheel 512 May 12 20:55 htdocs
drwxr-xr-x 2 www wheel 512 May 13 02:20 logs
ls -l /SAVE/
total 3892264
drwx------ 2 www wheel 512 Apr 11 00:06 0
drwx------ 2 www wheel 512 May 13 01:42 1
drwx------ 2 www wheel 512 Apr 11 00:06 11
drwx------ 2 www wheel 512 Apr 11 00:06 12
drwx------ 2 www wheel 512 Apr 11 00:06 2
drwxr-xr-x 3 www wheel 512 Apr 24 18:25 d0
drwxr-xr-x 5 www wheel 512 May 11 08:58 d1
drwxr-xr-x 2 www wheel 512 Apr 9 05:33 d11
drwxrwxr-- 8 www tuyosi 512 May 2 10:24 d12
drwxr-xr-x 3 www wheel 512 Dec 31 03:46 d2
/etc/nginx/nginx.conf
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;
server_name localhost; #<-for test
root /var/www/d0;
}
server {
listen 80;
server_name a.mydns.jp;
root /var/www/d0;
}
server {
listen 80;
server_name s.sun.ddns.vc;
root /var/www/d1;
auth_basic "Restricted";
auth_basic_user_file /var/www/1/.htpasswd;
}
server {
listen 80;
server_name k.sun.ddns.vc;
root /var/www/d2;
auth_basic "Restricted";
auth_basic_user_file /var/www/2/.htpasswd;
}
server {
listen 80;
server_name m.planex.ddns.vc;
root /var/www/d11;
auth_basic "Restricted";
auth_basic_user_file /var/www/11/.htpasswd;
}
server {
listen 80;
server_name n.luna.ddns.vc;
root /var/www/d12;
auth_basic "Restricted";
auth_basic_user_file /var/www/12/.htpasswd;
}
}
0 件のコメント:
コメントを投稿