Beautiful! Why does removing SCRIPT_NAME fix the issue?
Thank you, Ryan- On Thu, Jul 21, 2011 at 12:02 AM, Roberto De Ioris <[email protected]> wrote: > > Il giorno 21/lug/2011, alle ore 08:24, Ryan Showalter ha scritto: > >> Hey everyone, >> >> I'm attempting to run some virtualenv apps with uwsgi using the vhost >> and no-site options, and I've got everything working great except for >> a small error. If I have 1 server_name of example.aaa.com and another >> of example2.aaa.com, the first time I load each one, everything works >> fine. However, when attempting to load them on subsequent requests, >> uwsgi becomes confused and will show the wrong virtualenv (it shows >> the example2 virtualenv when requesting example.aaa.com one out of >> every 5 times or so). >> >> Looking at the debug logs, it looks like the proper server_name is >> being detected, but for some reason the chdir is not always set >> correctly. The relevant information from the nginx config and my >> uwsgi config are below with the logs as well. >> >> I'm using uWSGI 0.9.8.2 compiled with Python 2.6 (and both virtualenvs >> are also running python 2.6) with debugging enabled. >> >> NGINX: >> >> /etc/nginx/sites-enabled/example.aaa.com: >> >> include uwsgi_params; >> uwsgi_param UWSGI_PYHOME /opt/webapps/example.aaa.com; >> uwsgi_param UWSGI_CHDIR /opt/webapps/example.aaa.com; >> uwsgi_param UWSGI_SCRIPT config.django_wsgi; >> uwsgi_param SCRIPT_NAME /; >> uwsgi_modifier1 30; >> >> >> /etc/nginx/sites-enabled/example2.aaa.com: >> >> include uwsgi_params; >> uwsgi_param UWSGI_PYHOME /opt/webapps/example2.aaa.com; >> uwsgi_param UWSGI_CHDIR /opt/webapps/example2.aaa.com; >> uwsgi_param UWSGI_SCRIPT config.django_wsgi; >> uwsgi_param SCRIPT_NAME /; >> uwsgi_modifier1 30; >> >> /etc/uwsgi/conf.yml >> uwsgi: >> master: true >> processes: 3 >> memory-report: true >> harakiri: 30 >> vacuum: true >> max-requests: 500 >> reload-on-as: 256 >> reload-on-rss: 128 >> vhost: true >> no-site: true >> daemonize: /var/log/uwsgi.log >> socket: /tmp/uwsgi.sock >> > > Can you retry without specifying the SCRIPT_NAME in both config ? > > Thanks > > -- > 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
