Mayan behind Apache Reverse Proxy

Reverse proxies, SSL termination, web servers, helm charts, integrations, batch files, anything having to do with installing Mayan.
Post Reply
Posts: 6
Joined: Tue Sep 17, 2019 7:33 am

Mayan behind Apache Reverse Proxy

Post by EdVonSchleck »


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                                                                                                                                                                                            
    ProxyPass /mayan/                                                                                                                                                                      
    ProxyPassReverse /mayan/                 
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:
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
Posts: 649
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico

Re: Mayan behind Apache Reverse Proxy

Post by rosarior »


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.
Posts: 1
Joined: Fri Mar 27, 2020 2:41 pm

Re: Mayan behind Apache Reverse Proxy

Post by telsch »

Found a similar question here.
I followed this guide for docker and traefik but want to serve on a sub url.

Any update to support this natevely in Mayan?
Post Reply