Yeah, forgot to check the /static. See note below though.
> On 21 Feb 2019, at 11:52 pm, [email protected] wrote:
>
> Yes, now both sites are working! Thank you very much for your help, Graham!
>
> For those who will have similar situation as mine here is additional info.
>
> After I've corrected .conf file as Graham had advised me, I ran into another
> problem: site1 works correctly, site2 loads without static files, although I
> have ones.
>
> In order to fix this problem we need to change a bit .conf file again:
> =============================================================================================
>
> WSGIRestrictEmbedded On
>
> <VirtualHost *:80>
>
> WSGIDaemonProcess site1 python-path=/home/user/site1
> python-home=/home/user/site1/venv1
> WSGIScriptAlias /site1 /home/user/site1/site1/wsgi.py
> process-group=site1 application-group=%{GLOBAL}
>
> Alias site1/static /home/user/site1/static
Just make sure using:
Alias /site1/static /home/user/site1/static
That is, the first argument should start with '/'. Not sure if this was just an
oversight in masking any details didn't want to show, or is what you actually
have. It could be that Apache works without the slash, but recommend ensuring
you have it.
BTW, on the issue of running multiple sites and requests getting mixed up, also
worthwhile reading:
http://blog.dscpl.com.au/2012/10/requests-running-in-wrong-django.html
<http://blog.dscpl.com.au/2012/10/requests-running-in-wrong-django.html>
Graham
>
> <Directory /home/user/site1/static>
> Require all granted
> </Directory>
>
>
> <Directory /home/user/site1/site1>
>
> <Files wsgi.py>
> Require all granted
> </Files>
> </Directory>
>
> WSGIDaemonProcess site2 python-path=/home/user/site2
> python-home=/home/user/site2/venv2
> WSGIScriptAlias /site2 /home/user/site2/site2/wsgi.py
> process-group=site2 application-group=%{GLOBAL}
>
> Alias site2/static /home/user/site2/static
>
> <Directory /home/user/site2/static>
> Require all granted
> </Directory>
>
>
> <Directory /home/user/site2/site2>
> <Files wsgi.py>
> Require all granted
> </Files>
> </Directory>
>
> </VirtualHost>
> ================================================================================================
>
> Then we need to access site1/site1/settings.py and change the value of
> STATIC_URL to '/site1/static/'.
> In site2/site2/settings.py we change the value of STATIC_URL to
> '/site2/static/' respectively.
>
> After these corrections both sites will be working correctly!
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.