Il giorno 29/mag/2012, alle ore 17:37, orsomannaro ha scritto: > Il 29/05/2012 15:43, Roberto De Ioris ha scritto: > >> Do you want web2py under /w2p and mercurial under something like /hg for the >> same domain ? > > > Yes, perfect!!
Create a WSGI module for mercurial: # call it hg_wsgi.py from mercurial.hgweb.hgwebdir_mod import hgwebdir from mercurial.hgweb.request import wsgiapplication application = hgwebdir("hgwebdir.config") Create the hgwebdir.config file: [web] style = coal [paths] /foo = /bar /foo2 = /bar2 Each option in the [paths] section is a repository to mount under a specific path. For example if you have the repository in /var/repos/foobar you can use /foo = /var/repos/foobar Finally configure uWSGI: [uwsgi] ; your communication socket socket = XXX ; enable the master master = true ; set the number of processes processes = 4 ; mount mercurial under /hg mount = /hg=path_to/hg_wsgi.py ; mount web2py under /w2p mount = /w2p=path_to_web2py/wsgihandler.py ; make uWSGI smart about SCRIPT_NAME manage-script-name = true You do not need to configure nginx for both apps, simply map / to the uwsgi socket location / { include uwsgi_params; uwsgi_pass XXX; } -- Roberto De Ioris http://unbit.it JID: robe...@jabber.unbit.it