> > Hi, > > is it possible to make index files work with multiple plugins, > that is e.g. to allow both /foo/index.cgi and /bar/index.php as > index files when using the CGI and PHP plugins? The problem is > that using CGI and PHP in parallel seems to require routing based > on filename extensions which obviously doesn't work in case of > index files and routing currently doesn't have dynamic file > checks.
This is what i use in my company to give hosting of cgi and php in the same instance (i think the mail client will cut some line, so pay attention to the content): 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 = basically i instruct uWSGI to force the rewrite of the path_info to index.something, but then i skip that extension, so it will be passed to the corresponding plugin. finally i set routing based on file extension (php-index is required for security reasons, it will work even without that) -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
