[GH-ISSUE #254] Apache 2 wsgi application ignore papermerge.conf.py #205

Closed
opened 2026-02-25 21:31:26 +03:00 by kerem · 3 comments
Owner

Originally created by @celi28 on GitHub (Dec 12, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/254

Originally assigned to: @ciur on GitHub.

Description
On Ubuntu 20.04.1 LTS, apache2 wsgi mod application seem to ignore papermerge.conf.py

Expected
Expected to serve app. as ./manage.py runserver 0.0.0.0:80 does

Actual
Serve papermerge app. like it was no papermerge.conf.py file. Serving with default configuration

Info:

  • OS: Ubuntu 20.04.1 LTS
  • Database SQLite
  • Papermerge Version : v1.5.3

Configs:

/etc/apache2/sites-enabled/papermerge.conf

<VirtualHost *:80>
    <Directory /opt/papermerge/config>
        Require all granted
    </Directory>

    Alias /media/ /var/media/papermerge/
    Alias /static/ /opt/papermerge/static/

    <Directory /var/media/papermerge>
       Require all granted
    </Directory>

    <Directory /opt/papermerge/static>
      Require all granted
    </Directory>

    ServerName papermerge.home
    ServerRoot /opt/papermerge
</VirtualHost>

WSGIPythonHome /opt/papermerge/.venv/
WSGIPythonPath /opt/papermerge/
WSGIScriptAlias / /opt/papermerge/config/wsgi.py

/opt/papermerge/config/wsgi.py

import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.dev")
application = get_wsgi_application()

/opt/papermerge/papermerge.conf.py

OCR_LANGUAGES = {
    'fra': 'Français',
    'eng': 'English'
}

OCR_DEFAULT_LANGUAGE = "fra"
Originally created by @celi28 on GitHub (Dec 12, 2020). Original GitHub issue: https://github.com/ciur/papermerge/issues/254 Originally assigned to: @ciur on GitHub. **Description** On Ubuntu 20.04.1 LTS, apache2 wsgi mod application seem to ignore papermerge.conf.py **Expected** Expected to serve app. as ./manage.py runserver 0.0.0.0:80 does **Actual** Serve papermerge app. like it was no papermerge.conf.py file. Serving with default configuration **Info:** - OS: Ubuntu 20.04.1 LTS - Database SQLite - Papermerge Version : v1.5.3 **Configs:** /etc/apache2/sites-enabled/papermerge.conf ``` <VirtualHost *:80> <Directory /opt/papermerge/config> Require all granted </Directory> Alias /media/ /var/media/papermerge/ Alias /static/ /opt/papermerge/static/ <Directory /var/media/papermerge> Require all granted </Directory> <Directory /opt/papermerge/static> Require all granted </Directory> ServerName papermerge.home ServerRoot /opt/papermerge </VirtualHost> WSGIPythonHome /opt/papermerge/.venv/ WSGIPythonPath /opt/papermerge/ WSGIScriptAlias / /opt/papermerge/config/wsgi.py ``` /opt/papermerge/config/wsgi.py ``` import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.dev") application = get_wsgi_application() ``` /opt/papermerge/papermerge.conf.py ``` OCR_LANGUAGES = { 'fra': 'Français', 'eng': 'English' } OCR_DEFAULT_LANGUAGE = "fra" ```
kerem 2026-02-25 21:31:26 +03:00
Author
Owner

@wedganw commented on GitHub (Feb 6, 2021):

Copying the papermerge.conf.py from the project directory to /etc/papermerge.conf.py worked for me.
Didn't testet it but I think it has something to do with how the "DEFAULT_CONFIG_PLACES" is implemented in /opt/papermerge/config/settings/base.py.

DEFAULT_CONFIG_PLACES = [ "/etc/papermerge.conf.py", "papermerge.conf.py" ]

<!-- gh-comment-id:774502981 --> @wedganw commented on GitHub (Feb 6, 2021): Copying the papermerge.conf.py from the project directory to /etc/papermerge.conf.py worked for me. Didn't testet it but I think it has something to do with how the "DEFAULT_CONFIG_PLACES" is implemented in /opt/papermerge/config/settings/base.py. `DEFAULT_CONFIG_PLACES = [ "/etc/papermerge.conf.py", "papermerge.conf.py" ]`
Author
Owner

@ciur commented on GitHub (Feb 7, 2021):

@celi28 I think @wedganw's comment should solve your issue as well. Can you please try it?

<!-- gh-comment-id:774640423 --> @ciur commented on GitHub (Feb 7, 2021): @celi28 I think @wedganw's comment should solve your issue as well. Can you please try it?
Author
Owner

@ciur commented on GitHub (Feb 22, 2021):

response time out :)

<!-- gh-comment-id:783315164 --> @ciur commented on GitHub (Feb 22, 2021): response time out :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#205
No description provided.