Welcome! Log In Create A New Profile

Advanced

Having issues with nginx / root captures (0.7.53)

April 30, 2009 06:51PM
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?
Subject Author Posted

Having issues with nginx / root captures (0.7.53)

mike April 30, 2009 06:51PM

Re: Having issues with nginx / root captures (0.7.53)

Igor Sysoev May 01, 2009 01:57AM

Re: Having issues with nginx / root captures (0.7.53)

mike May 01, 2009 02:16AM

Re: Having issues with nginx / root captures (0.7.53)

mike May 01, 2009 02:49AM

Re: Having issues with nginx / root captures (0.7.53)

Igor Sysoev May 01, 2009 02:41AM

Re: Having issues with nginx / root captures (0.7.53)

mike May 01, 2009 02:26AM

Re: Having issues with nginx / root captures (0.7.53)

Igor Sysoev May 01, 2009 02:38AM

Re: Having issues with nginx / root captures (0.7.53)

mike May 01, 2009 02:53AM

Re: Having issues with nginx / root captures (0.7.53)

Igor Sysoev May 01, 2009 02:54AM

Re: Having issues with nginx / root captures (0.7.53)

Igor Sysoev May 01, 2009 03:15AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready