Thanks Roberto for this very fast response. I think that the <name>
directive makes sense to me however it seems that wsgi spec call them
differently :
http://www.python.org/dev/peps/pep-0333/#url-reconstruction

<http://www.python.org/dev/peps/pep-0333/#url-reconstruction>If I understand
the document above in the wsgi vocabulary we are talking of :
SERVER_NAME  = <server_name>
SERVER_PORT = <server_port>

However at the end these are just names so if you prefer <name> and <port>
it is also fine with me  :-)

Regards,
--yml


On Mon, Jan 31, 2011 at 4:01 PM, Roberto De Ioris <[email protected]> wrote:

>
> Il giorno 31/gen/2011, alle ore 13.07, Yann Malet ha scritto:
>
> > Hello,
> >
> > In the recent uwsgi progress a feature capture my attention : emperor
> mode
> > This is solving a problem we are often facing so I was trying to make
> sense of it. I have created a mercurial repo that contains the directory
> structure I am trying to use :
> >  * https://bitbucket.org/yml/uwsgi-emperor-template-configuration/src
> >
> > The idea is to find a generic directory structure that I could easily
> deploy on a server. The overall process is :
> >
> > hg clone https://bitbucket.org/yml/uwsgi-emperor-template-configuration
> > pip install -E uwsgi-tip -r requirement.pip
> > start-uwsgi.sh
> >
> > In the directory called "vassal-sites" I have added 2 simple wsgi apps.
> Each of them has a uwsgi configuration file.
>
> you have extended the directory structure with another level
> (site1/site1.xml instead of site1.xml).
> This is not a problem (i will fix it in 2 minutes), and i found it a good
> approach for mass/automatic deploy.
>
> >
> > So far I haven't been able to setup "Cherokee" to serve the wsgi apps.
> > I have added a vserver called "uwsgi-emperor", document root=/var/www. I
> have uncheck the 'check_file' property.
> >  This emperor host match is defined like this : Wildcard and the domain
> pattern : *
>
> The problem is that Cherokee does not know the name of the  socket to
> connect to (and it must be based on the hostname).
>
> The emperor should start a proxy/router that forward request to specific
> instances based on HTTP_HOST/SERVER_NAME
> variables. But how to pass this information from the instance to the
> emperor ?
>
> The sequence will be:
>
> client connect to cherokee
> cherokee connect to emperor
> emperor check its internal table and choose the right socket
> emperor connect to instance
> instance wiil generate response
>
> I could add an option "name" that can have multiple use.
>
> For example if you have a configuration like this:
>
> <uwsgi>
>    <socket>/var/run/%s.sock</socket>
>    <module>myapp</module>
>    <name>yml.com</name>
>    <name>yml2alias.com</name>
> </uwsgi>
>
> If run by a emperor thsi instance will announce to the emperor that
> everytime he receives
> a HTTP_HOST/SERVER_NAME == name the request must be forwarded to its
> socket.
>
> Other ideas ?
>
> --
> Roberto De Ioris
> http://unbit.it
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to