* Roberto De Ioris <[email protected]> [2014-01-22 11:06]:
>
>> * Roberto De Ioris
>> <[email protected]> [2014-01-22
>> 09:02]:
>>>> Hi,
>>>>
>>>> I'm revisiting static file serving from outside the docroot via
>>>> routing. Based on my initial thread at
>>>> http://lists.unbit.it/pipermail/uwsgi/2013-July/006214.html I've
>>>> come up with the following minimal configuration:
>>>>
>>>> [uwsgi]
>>>> plugins =
>>>> 0:notfound,http,cgi,router_redirect,router_rewrite,router_static,router_uwsgi
>>>> http-socket = 127.0.0.1:8080
>>>>
>>>> route-if-not = regexp:${PATH_INFO};^/webapp(/.*)? goto:skip-webapp
>>>> route-run = setdocroot:/tmp/webapp
>>>> route-if = regexp:${PATH_INFO};^/webapp(/.*)?$ setpathinfo:$1
>>>> ;route-if = regexp:${PATH_INFO};\.(php|php5|cgi|lua|pl|py|rb|sh|tcl)$
>>>> goto:skip-webapp
>>>> route-if = isfile:/tmp/webapp/${PATH_INFO}
>>>> file:filename=/tmp/webapp/${PATH_INFO};mime=1
>
>
>
> here is ,mime=1 not ;mime=1
>
> basically it is checking for foobar;mime=1 instead of foobar
>
> (use strace to catch this kind of errors)
Duh, thanks.
Why does it not return a 404 in this case? Interestingly it
stat's the right file:
23420 stat("/tmp/webapp//index.txt", {st_mode=S_IFREG|0644, st_size=13, ...}) = 0
23420 open("/tmp/webapp//index.txt;mime=1", O_RDONLY) = -1 ENOENT (No such file
or directory)
--
Guido Berhoerster
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi