> 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 > route-label = skip-webapp > ;for = .cgi .lua .pl .py .rb .sh .tcl > ; route = \%(_)$ uwsgi:,9,0 > ;endfor = > > However I cannot get it to work, uwsgi only closes the connection > when requesting an existing file: > > $ ls /tmp/webapp/ > index.cgi index.html > $ curl -v http://127.0.0.1:8080/webapp/index.html > * About to connect() to 127.0.0.1 port 8080 (#0) > * Trying 127.0.0.1... > * Adding handle: conn: 0x7e14c0 > * Adding handle: send: 0 > * Adding handle: recv: 0 > * Curl_addHandleToPipeline: length: 1 > * - Conn 0 (0x7e14c0) send_pipe: 1, recv_pipe: 0 > * Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0) >> GET /webapp/index.html HTTP/1.1 >> User-Agent: curl/7.32.0 >> Host: 127.0.0.1:8080 >> Accept: */* >> > * Empty reply from server > * Connection #0 to host 127.0.0.1 left intact > curl: (52) Empty reply from server > > Any idea what's wrong here? > > Thanks, > -- > Guido Berhoerster > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
Does the uWSGI log report something ? -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
