Lighttpd.conf rails generator
Posted by ezmobius Sat, 05 Nov 2005 22:26:00 GMT
Here is a simple generator I wrote for generating lighttpd.conf filees for either fastcgi or scgi. It creates a lighttpd_fcgi.conf or lighttpd_scgi.conf in your config directory.
Untar the archive and put the lighttpd folder into ~/.rails/generators/lighttpd, and it will automatically be available as a generator for your rails projects.
If you are running fcgi then you use the generator like this:
$ script/generate lighttpd fcgi
If you already have Zed Shaw’s SCGI Rails Runner installed and you have already ran the scgi_ctrl command then you use the generator like this:
$ script/generate lighttpd scgi
When you generate a lighty config for scgi it reads in your config/scgi.yaml (that was generated when you ran scgi_ctrl) and creates the correct lighty config directives from that. It creates two files, lighttpd_scgi.conf and scgi_conf.inc. In the main lighty conf file it has an include directive to include the scgi_conf.inc file. This way you can regenerate the scgi_conf.inc file when your scgi configuration changes without the need to redo any changes to the main lighttpd_scgi.conf file.
Anyway, here is a linnk to the generator. If you have any questions or suggestions for more features let me know. I plan on adding scgi and fcgi clustering commands and also apache config files eventually as well.