Having issues with nginx / root captures (0.7.53)

Michael Shadle mike503 at gmail.com
Fri May 1 02:51:04 MSD 2009


i have this, which seemed like it would work according to my attempt
just a week ago...

server {
        listen 80;
        index index.php index.html;
        server_name ~^foo(.*?)\.bar\.ssgisp\.com$;
        root /home/mike/web/foo$1;
        include /etc/nginx/defaults.conf;
        include /etc/nginx/development.conf;
        include /etc/nginx/expires.conf;
        location ~ \.php$ {
                fastcgi_pass 127.0.0.1:11001;
        }
}

this is what the log shows in debug mode:

2009/04/30 14:43:25 [debug] 8702#0: *16 http script copy: "/home/mike/web/foo"
2009/04/30 14:43:25 [debug] 8702#0: *16 http script capture: "html"
2009/04/30 14:43:25 [debug] 8702#0: *16 http filename:
"/home/mike/web/foohtml/index.html"
2009/04/30 14:43:25 [debug] 8702#0: *16 add cleanup: 0000000015092358
2009/04/30 14:43:25 [error] 8702#0: *16 open()
"/home/mike/web/foohtml/index.html" failed (13: Permission denied),
client: 134.134.139.71, server: ~^foo(.*?)\.mike\.bar\.com$, request:
"GET /index.html HTTP/1.1", host: "foo2.mike.bar.com"

non-debug:


2009/04/30 14:46:29 [crit] 8726#0: *17 stat()
"/home/mike/web/foo/index.html" failed (13: Permission denied),
client: 13.13.13.71, server: ~^foo(.*?)\.mike\.bar\.com$, request:
"GET /index.html HTTP/1.1", host: "foo2.mike.bar.com"
2009/04/30 14:46:29 [error] 8726#0: *17 open()
"/home/mike/web/foohtml/index.html" failed (13: Permission denied),
client: 13.13.13.71, server: ~^foo(.*?)\.mike\.bar\.com$, request:
"GET /index.html HTTP/1.1", host: "foo2.mike.bar.com"

All I want is

foo.mike.bar.com
foo2.mike.bar.com
foo-anything.mike.bar.com

to map to /home/mike/web/foo, /home/mike/web/foo2,
/home/mike/web/foo-anything, etc...

Am I missing something here? and why is it capturing 'html' in the
capture? I'm only creating a $1 from the server_name, is "html" a
default somewhere?





More information about the nginx mailing list