[GeoNode-users] geonode causing alphabetic dependency in apache sites-enabled

Charles Cossé ccosse at gmail.com
Mon Sep 28 07:36:33 PDT 2015


When serving 2+ apache-wsgi-django sites from the same server each site's
wsgi.py contains a section like:

settings_module = "mysite.settings"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
import django
django.setup()

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:

    WSGIDaemonProcess www.mysite.org processes=1 threads=20
inactivity-timeout=60 display-name=[wsgi-mysite]httpd
    WSGIProcessGroup www.mysite.org
    WSGIScriptAlias / /var/www/mysite/mysite/apache/wsgi.py

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.

-Charles


On Tue, Sep 1, 2015 at 9:13 AM, Charles Cossé <ccosse at gmail.com> wrote:

> 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.
>
> Let's say that I have:
>
>    1. www.mydomain.org  enabled via /etc/apache2/sites-enabled/aaa.conf
>    2. geonode.mydomain.org enabled via /etc/apache2/sites-enabled/ggg.conf
>
> 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 "
> hhh.org", 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?
>
> Thanks,
>
> -Charles
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150928/8f257ac7/attachment.html>


More information about the geonode-users mailing list