<div dir="ltr"><div>When serving 2+ apache-wsgi-django sites from the same server each site's wsgi.py contains a section like:<br><br><div style="margin-left:40px">settings_module = "mysite.settings" <br>os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)<br>import django<br>django.setup()<br></div><br></div>After a couple requests to different virtual domains (using different settings.py) site#2 can easily find itself trying to use site#1's settings.py and producing errors. Unless(!) you add the following in the associated /etc/apache2/sites-available/mysite.conf files:<br><div><div><div><div><br> WSGIDaemonProcess <a href="http://www.mysite.org">www.mysite.org</a> processes=1 threads=20 inactivity-timeout=60 display-name=[wsgi-mysite]httpd<br> WSGIProcessGroup <a href="http://www.mysite.org">www.mysite.org</a><br> WSGIScriptAlias / /var/www/mysite/mysite/apache/wsgi.py<br><br></div><div>This keeps the respective wsgi processes separated and eliminates the above confusion. I've struggled with this for some time and only just found this solution, so sharing for anyone with similar problems. Have not tested with respect to the "alphabetic dependency" mentioned in original message, but this certainly applies when serving additional virtual domains alongside geonode. <br><br></div><div>-Charles<br></div><div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 1, 2015 at 9:13 AM, Charles Cossé <span dir="ltr"><<a href="mailto:ccosse@gmail.com" target="_blank">ccosse@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, when serving virtual domains in addition to GeoNode I have noticed an apparent alphabetic dependency with respect to the /etc/apache2/sites-enabled/.conf files.<br><br></div>Let's say that I have:<br><ol><li><a href="http://www.mydomain.org" target="_blank">www.mydomain.org</a> enabled via /etc/apache2/sites-enabled/aaa.conf</li><li><a href="http://geonode.mydomain.org" target="_blank">geonode.mydomain.org</a> enabled via /etc/apache2/sites-enabled/ggg.conf</li></ol><p>My observation is that requests to the geonode site generate 400 (Bad Request) errors when the first letter of the other .conf file is any letter "a" through "f". If I change the first letter of the other virtual domain to something which occurs alphabetically after the letter "g", for example "<a href="http://hhh.org" target="_blank">hhh.org</a>", then things work fine. I've just tested this repeatedly with Firefox and Chrome, both, and the results are consistent. It sounds a little crazy to me but it also appears to be real. Has anyone noticed this before, or can reproduce it? <br></p><p>Thanks,</p><p>-Charles<br></p><p><br></p></div>
</blockquote></div><br></div>