> plugins = 0:notfound,cgi,php,router_uwsgi > > http-socket = :8080 > > docroot = /home/gber/public_html/ > > check-static = %(docroot) > > cgi = %(docroot) > > for = index.xhtml index.html index.htm index.rhtml index.pl index.rb > index.py index.cgi index.hs index.php index.php4 index.php5 index.sh > index.php3 index.tcl index.shtml > static-index = %(_) > endfor = > > for = .cgi .pl .py .rb .cgi .hs .php .php4 .php5 .sh .php3 .tcl .shtml .so > static-skip-ext = %(_) > endfor = > > for = .cgi .pl .py .rb .hs > route = \%(_)$ uwsgi:,9,0 > endfor = > > for = .php .php3 .php4 .php5 .inc > php-allowed-ext = %(_) > php-index = index%(_) > route = \%(_)$ uwsgi:,14,0 > endfor = > > ---- > > I have the following docroot: > > ---- > > $ find /home/gber/public_html -print > /home/gber/public_html > /home/gber/public_html/foo/ > /home/gber/public_html/foo/index.pl > /home/gber/public_html/bar/ > /home/gber/public_html/bar/index.php > /home/gber/public_html/baz/ > /home/gber/public_html/baz/index.html > > Requesting the files explicitly works: > > ---- > > $ for p in foo/index.pl bar/index.php baz/index.html; do curl -I > http://127.0.0.1:8080/${p}; done > HTTP/1.1 200 OK > Content-type: text/html > > HTTP/1.1 200 OK > X-Powered-By: PHP/5.3.3 > Content-type: text/html > > HTTP/1.1 200 OK > Content-Type: text/html > Content-Length: 93 > Last-Modified: Thu, 28 Feb 2013 09:45:53 GMT > > ---- > > But as index files they do not work: > > ---- > > $ for p in foo/ bar/ baz/; do curl -I http://127.0.0.1:8080/${p}; done > HTTP/1.1 404 Not Found > Connection: close > Content-Type: text/plain > > HTTP/1.1 404 Not Found > Connection: close > Content-Type: text/plain > > HTTP/1.1 404 Not Found > Connection: close > Content-Type: text/plain > > ---- > > This is with the latest git snapshot. > -- > Guido Berhoerster > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
Just fixed a stupid bug with 1.9 --static-index :P This is a more readable example: [uwsgi] plugins = 0:notfound,cgi,php http-socket = :8080 docroot = /root/uwsgi/testcgi check-static = %(docroot) cgi = %(docroot) for = cgi pl py php php4 php5 inc static-index = index.%(_) static-skip-ext = .%(_) endfor = for = cgi pl py route = \.%(_)$ uwsgi:,9,0 cgi-index = index.%(_) endfor = for = php php4 php5 inc php-index = index.%(_) php-allowed-ext = .%(_) route = \.%(_)$ uwsgi:,14,0 endfor = -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
