Mayan behind Apache Reverse Proxy

Reverse proxies, SSL termination, web servers.
Post Reply
EdVonSchleck
Posts: 1
Joined: Tue Sep 17, 2019 7:33 am

Mayan behind Apache Reverse Proxy

Post by EdVonSchleck » Tue Sep 17, 2019 7:47 am

Hello,

I would like to run Mayan behind an Apache Reverse Proxy that also is the https endpoint.
I would like to rach mayan by the URL: https://<domain>/mayan/
Straight forward integration does not work (from apache.conf):

Code: Select all

    
<Location /mayan/>                                                                                                                                                                                             
        AuthType basic                                                                                                                                                                                             
        AuthName "Mayan"                                                                                                                                                                                   
        AuthBasicProvider file                                                                                                                                                                                     
        AuthUserFile /var/www/htpass/passwords                                                                                                                                                                     
        Require user mayan                                                                                                                                                                                            
    </Location>                                                                                                                                                                                                    
...
    ProxyPass /mayan/ http://10.10.7.18:8000/                                                                                                                                                                      
    ProxyPassReverse /mayan/ http://10.10.7.18:8000/                 
When I surf to the URL https://<domain>/mayan/ I get the answer "document not found at <reverse proxy>".
The URL changes to: https://<domain>/authentication/login/?next=/
I guess the issue is connected to how django rewrites URLs.
Access from LAN works but I did not complete the setup as I am currently working remotely.

I think that the proxy itself works as it serves other sites without problems.

I installed the current mayan (as of 16.09.2019) by direct installation as described in: https://docs.mayan-edms.com/chapters/deploying.html
which worked without errors. Supervisor started some mayan processes.
I am not familiar with python and django. I cannot even find configs or the log files.

Does anyone have a running setup and can point me how to tweak the installation?

Best regards

User avatar
rosarior
Posts: 393
Joined: Tue Aug 21, 2018 3:28 am

Re: Mayan behind Apache Reverse Proxy

Post by rosarior » Thu Sep 19, 2019 3:09 pm

Hi,

Django, the framework used for Mayan has some issues with deploying or accessing sub URLs. We've been adding some changes on our own to support this natevely in Mayan but it is not complete yet. Try changing all references to /mayan to just root (/) to verify this is the issue. Thanks.

Post Reply