Re: [Cppcms-users] xsendfile
Brought to you by:
artyom-beilis
From: Artyom <art...@ya...> - 2009-12-01 15:48:16
|
> But because of another bug I can't use lighttpd (at least the 1.4.*): > http://redmine.lighttpd.net/issues/show/729 Have you tried to use it with URL-rewriting? Url rewriting would solve this problem for you. > Any hints? What happens is that you redirect from /logo.png -> /Homepage/logo.png. So then it looks where "/Homepage/log.." is placed and all starts again. I assume that this would be problematic for you to serve files from "/" and do anything else from "/" as I told before. So, for most generic case I would still recommend to use URL-rewriting. > @Artyom: Do you plan to add sendfile support in the cppcms_run configs? At > least for lighttpd it is very easy. I don't, but it shouldn't be too hard. However I don't think this is really necessary. The real issue is that Apache, Nginx and Lighttpd have different semantics for X-Send-File... So the CppCMS based software should deal with them differently, when the script tryes to unify the access to all web servers -- so it some kind of contradiction. I would suggest, for special cases where you do need to tweak web server configuration, just create a configuration file and run web server directly like: /usr/sbin/lighttpd -D -f ligthy.conf That's it. You can keep it persistent and not shut down when you work, because in any case of new connection it would try to make a new one so when you shut CppCMS application down, web server would not even notice. Only thing that remains is to run ./foobar -c config.txt cppcms_run utility was mostly provided to simplify web server configuration for common case. It can't be replacement for real configuration that should be created for the web server. Artyom |