0

I got the weblate running in dev mode with :8000. But I am not able to get it running in apache2 with wsgi within the virtual environment, where everything worked.

Based on apache errors, it could not even find django installed. I did that but saw another error of a missing module. Its clear that wsgi is not respecting/searching for modules in the virtualenv for python.

My server is Ubuntu 19.04.

Please suggest.

<VirtualHost *:80>
    ServerName xxyyzz.com

    # DATA_DIR/static/favicon.ico
    Alias /favicon.ico xxyyzz/weblate-env/lib/python3.7/site-packages/data/static/favicon.ico

    # DATA_DIR/static/
    Alias /static/ xxyyzz/weblate-env/lib/python3.7/site-packages/data/static/
    <Directory xxyyzz/weblate-env/lib/python3.7/site-packages/data/static/>
        Require all granted
    </Directory>

    # DATA_DIR/media/
    Alias /media/ xxyyzz/weblate-env/lib/python3.7/site-packages/data/media/
    <Directory /home/weblate/data/media/>
        Require all granted
    </Directory>

    # Path to your Weblate virtualenv
    WSGIDaemonProcess weblate python-path=xxyyzz/weblate-env
    WSGIProcessGroup weblate
    WSGIApplicationGroup weblate

    WSGIScriptAlias / xxyyzz/weblate-env/lib/python3.7/site-packages/weblate/wsgi.py process-group=weblate
    WSGIPassAuthorization On

    <Directory xxyyzz/weblate-env/lib/python3.7/site-packages/weblate/>
        <Files wsgi.py>
        Require all granted
        </Files>
    </Directory>

</VirtualHost>

Same as: https://docs.weblate.org/en/latest/admin/install.html

thevikas
  • 1,618
  • 1
  • 14
  • 31

1 Answers1

0

It turns out that the example configuration is wrong, it should be using python-path instead of python-home for WSGIDaemonProcess. I've just fixed this in Weblate and you will probably need such change in your configuration as well.

Michal Čihař
  • 9,799
  • 6
  • 49
  • 87