Re: [Cppcms-users] Some remarks
Brought to you by:
artyom-beilis
From: Markus R. <us...@ma...> - 2009-10-28 22:03:55
|
Artyom wrote: > >> I tried it with nginx and apache2 and it did not work for both. > > I've made a little test with root "/" with cppcms_run as is > > - nginx worked but you should assume that path does not start with "/foo" > but rather with "foo" Could you give me the cppcms_run arguments? 1.) cppcms_run -h markusbyte -s /hello hello.fcgi -c config.txt 2.) cppcms_run -h markusbyte -s / hello.fcgi -c config.txt 1. line works here (below hello), but for 2. line nginx gives a 404 on any request. > - apache didn't want to accept my rules but it looks > like problem of configuration Ok, at the moment it would be enough if I get any server running with root "/". > Generally you should refer to the web server fast_cgi configuration to > make service work from "/". > [...] I will take a look at it. >> The file delievery already works btw. > > BTW CppCMS 1.x.x have its own internal web server and allows file hosting > for development purposes only. > > See: > [...] > > It may give you some ideas how could this look like in next version. File > Server itself is internal but it can be used as base for such application. Interesting, your code looks like a complete duplicate of mine (or the other way round) :-) I also used a map for the mime_types checking against extension() and for copying I also used the read and write and even the same buffer size :-) However I plan for the future to use shared-mime-info, which has much more complete information about mime-types. Why is this internal file server needed? > In any case, serving files efficiently is **very** hard task, and I would > recommend you relay on web server that can use functions like sendfile. Or > at least try to use features like X-Send-File header of lighttp and nginx. > Because, be shure they do it better then you can write with best cache. If there are performance issues I can use the X-Send-File feature, thank you for the hint. >> I have not used filters enough up to yet. But I am sure creating your own >> filters can be very handy. > > Take a look on Wikipp it has "markdown" filter that is used for formattng > pages. Ohh, thank you, I think I can use that markdown2html. Supporting a wiki syntax is the first extra feature on my wish list. best regards Markus Raab -- http://www.markus-raab.org | Glücklicher als der Glücklichste ist, wer -o) | andere Menschen glücklich machen kann. -- Kernel 2.6.24-1-a /\ | Alexandre Dumas on a x86_64 _\_v | |