Tuesday, March 1, 2016

Re: problem deploying two apps



On Tuesday, 1 March 2016 16:56:57 UTC, frocco wrote:
Hi,

I followed this
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/modwsgi/

First app works fine, if I deploy the second app, the settings conflict and images are not rendered.

[code]
Alias /static /var/www/django/track/static

<Directory /var/www/django/track/static>
    Require all granted
</Directory>

<Directory /var/www/django/track>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>


<Directory '/etc/httpd/django/scripts'>
    Require all granted
</Directory>

WSGIDaemonProcess track python-path=/var/www/django/track:/usr/lib/python2.7/site-packages
WSGIProcessGroup track
WSGIScriptAlias /track /var/www/django/track/track/wsgi.py process-group=track
[/code]

[code]
Alias /static /var/www/django/coffee/static

<Directory /var/www/django/coffee/static>
    Require all granted
</Directory>

<Directory /var/www/django/coffee>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>


<Directory '/etc/httpd/django/scripts'>
    Require all granted
</Directory>

WSGIDaemonProcess coffee python-path=/var/www/django/coffee:/usr/lib/python2.7/site-packages
WSGIProcessGroup coffee
WSGIScriptAlias /coffee /var/www/django/coffee/coffee/wsgi.py process-group=coffee


[/code]


I'm not sure why you are deploying these two apps separately on the same server. Usually the two apps would go together under one project, with one settings file, and you would deploy that project. collectstatic would take care of putting all the static files from both apps in the right place.
--
DR.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e3bbb18a-bdd3-4229-934a-807f663b0fda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment