Brian Beck wrote: > After a full weekend of tweaking and trying every combination of > lighttpd and CherryPy and scgi_server and flup configurations I could > think of, I still couldn't get the setup I want to work. It's quite > frustrating. I tried everything from Jon LaCour's blog and the > FastTrack code with no luck.
Sorry about that! Lets see if we can help you out here. > I want to use TurboGears to host my home page. That's the root > directory of my web server, /. > > I already have tons of crap already hosted on my web server, so I > can't > just direct lighttpd at it with a simple regular expression or move it > all into a /static directory. > > Since I want TurboGears to host from the root, I can't tell > lighttpd to > turn to TurboGears using a regular expression either. > > So, I need to use error-handler-404 (or whatever) to tell lighttpd > "when you don't find that file, run at this scgi/fcgi/py script" (or > something similar). So, you basically have a bunch of static files already on your web server that you want to serve while still having the root page served by TurboGears? I am sure that there is a way to make this happening by using 404 error handler tweaks or some other hackery, but it would certainly be a lot easier to do something else. One option would be to put a static index.html at your root that immediately redirects to a url where your TurboGears app is published, so you go to "/" and it basically immediately redirects you to "/blog" or whatever. Another option would be to have your TurboGears app published at a subdomain of your domain, so that your web server could redirect traffic from "whatever.yourdomain.com" to your TurboGears application, and all your static files would still work just fine. Or... you could just register another domain ;) If you still aren't happy with something like the above suggestions, then you also might be able to implement some CherryPy filter based on the static filter that will do exactly what you want, but that imposes a lot of overhead and a lot of extra work. > This also means I don't want to use a proxy by running another server > on my machine. I want to use a socket file. I am not sure where you got this. I don't know of any way to deploy TurboGears applications that doesn't involve starting your application process (which is a server). A socket file is just another way for the web server to talk to your application process. A regular socket over scgi isn't all that much different than a socket file, and its not really all *that* much different from just proxying to your CherryPy web server either (although I suspect lower performance with a proxy). > Looking at lighttpd/error.log is rarely helpful. I've had everything > from permission errors (easy), connection refused, no fcgi handler > found, fcgi server disabled, blah blah blah. I don't even remember > which error messages go with which configuration, in my mind they're > all equally broken and frustrating. Well, I will agree with you there. The errors in that file are indeed rarely useful. I wish I could help you more than the advice I offer above! > Any ideas? I don't care if it uses FastCGI or SCGI or whatever, I > just > want to solve the use case as described above. It seems to me that you are making life a lot harder for yourself than it needs to be by requiring that "/" be your TurboGears, and not moving all your static content to a "/static/" directory or something similar. Best of luck! -- Jonathan LaCour http://cleverdevil.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

