On Sun, Jan 16, 2011 at 08:45:46PM +0100, Michiel van Es wrote:
> 
> 
> "Tony Zakula" <[email protected]> wrote:
> 
> >2011/1/16 Michiel van Es <[email protected]>:
> >>
> >>
> >> "Jędrzej Nowak" <[email protected]> wrote:
> >>
> >>>On Sun, Jan 16, 2011 at 5:39 PM, Michiel van Es
> ><[email protected]>
> >>>wrote:
> >>>> With Nginx I had a fcgi script running through spawn-fcgi and Nginx
> >>>> connection to that fcgi process/port.
> >>>
> >>>Just do the same now ;) Define that as information source, then set
> >>>the handler in vserver to fcgi :)
> >>
> >> Do I add a new behaviour?
> >> And I just have to add a new information source?
> >>
> >>>
> >>>Pozdrawiam
> >>>Jędrzej Nowak
> >
> >I am not at work right now, but off the top of my head, I believe you
> >just add the information source and then set the default handler, but
> >it has been several months since I set it up.  I can look for you
> >tomorrow if you need it.
> 
> That would be very nice, thanks :)

I tried the following but I am not sure if this will work:

vserver!30!document_root = /srv/hg
vserver!30!match = target_ip
vserver!30!match!to!1 = 194.145.200.87
vserver!30!nick = mercurial.pcintelligence.nl
vserver!30!rule!103!handler = redir
vserver!30!rule!103!handler!rewrite!10!regex = /(.*)$
vserver!30!rule!103!handler!rewrite!10!show = 1
vserver!30!rule!103!handler!rewrite!10!substring = https://${host}/$1
vserver!30!rule!103!match = not
vserver!30!rule!103!match!right = tls
vserver!30!rule!3!document_root = /usr/share/cherokee/themes
vserver!30!rule!3!handler = file
vserver!30!rule!3!match = directory
vserver!30!rule!3!match!directory = /cherokee_themes
vserver!30!rule!2!document_root = /usr/share/cherokee/icons
vserver!30!rule!2!handler = file
vserver!30!rule!2!match = directory
vserver!30!rule!2!match!directory = /icons
vserver!30!rule!1!auth = htpasswd
vserver!30!rule!1!auth!methods = basic
vserver!30!rule!1!auth!passwdfile = /etc/nginx/mercurial_users
vserver!30!rule!1!auth!realm = Mercurial login
vserver!30!rule!1!document_root = /srv/hg/cgi-bin/
vserver!30!rule!1!handler = fcgi
vserver!30!rule!1!handler!balancer = round_robin
vserver!30!rule!1!handler!balancer!source!10 = 2
vserver!30!rule!1!handler!check_file = 1
vserver!30!rule!1!handler!error_handler = 1
vserver!30!rule!1!handler!pass_req_headers = 1
vserver!30!rule!1!handler!script_alias = /srv/hg/cgi-bin/hgwebdir.fcgi
vserver!30!rule!1!handler!xsendfile = 0
vserver!30!rule!1!match = default
vserver!30!rule!1!only_secure = 0
vserver!30!ssl_certificate_file = /etc/ssl/mercurial.pcintelligence.nl.pem
vserver!30!ssl_certificate_key_file = /etc/ssl/mercurial.pcintelligence.nl.pem
vserver!30!ssl_ciphers = HIGH

Normally I run a script to startup the /srv/hg/cgi-bin/hgwebdir.fcgi process 
running in a spawn-cgi, like this:
spawn-fcgi -a 127.0.0.1 -p 9001 -u www-data -g www-data -f 
/srv/hg/cgi-bin//hgwebdir.fcgi -P /var/run/fastcgi-mercurial.pid -C 1

and then I connect to it through Nginx:
                fastcgi_pass 127.0.0.1:9001;
                fastcgi_param SCRIPT_FILENAME 
/srv/hg/cgi-bin$fastcgi_script_name;


How would I translate that back into my cherokee config?

I've created a mercurial source:
-connection: 127.0.0.1:9001
Interpreter: spawn-fcgi /srv/hg/cgi-bin//hgwebdir.fcgi -P 
/var/run/fastcgi-mercurial.pid -C 1
Execute as user: www-data
Execute as group: www-data

Then on the virtual host: mercurial.pcintelligence.nl
- changed the Default rule to:
Handler: FastCGI
Document Root: /srv/hg/cgi-bin/
Script Alias: /srv/hg/cgi-bin/hgwebdir.fcgi
Balancer: Round Robin (is this the correct load balancing method?)
Information Sources: mercurial - hoost 127.0.0.1:9001

I stopped my spawn-cgi script as I think cherokee will now start it, is that 
correct?
Michiel
> 
> >
> >Tony Z
> Michiel
> -- 
> Michiel van Es
> _______________________________________________
> Cherokee mailing list
> [email protected]
> http://lists.octality.com/listinfo/cherokee
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to