profile
viewpoint

Ask questionsApache reverse proxy?

Hi

How can I run the docker install behind Apache reverse proxy?

I tried this line below under Apache and it does not work (Docker port is 8000 btw for me)

It works fine inside my network but I want to access it from outside

#Trilium ProxyPass /trilium http://192.168.1.100:8000 ProxyPassReverse /trilium http://192.168.1.100:8000

it redirects to /login

zadam/trilium

Answer questions AlexandreBonneau

I have the same problem than @truejelly with the neverending Lost websocket connection to the backend. If you keep having this issue repeatedly, you might want to check your reverse proxy (nginx, apache) configuration and allow/unblock WebSocket. ws.js:196:17 error message displayed every seconds.

I modified my apache conf from:

<VirtualHost *:80>
        ServerName tril.example.com
        ProxyPreserveHost On
        ProxyRequests Off
        ProxyPass / http://localhost:27633/
        ProxyPassReverse / http://localhost:27633/

        ErrorLog ${APACHE_LOG_DIR}/trilium/error.log
        CustomLog ${APACHE_LOG_DIR}/trilium/access.log combined

        # Lets encrypt
        RewriteEngine on
    RewriteCond %{SERVER_NAME} =tril.example.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

to

<VirtualHost *:80>
        ServerName tril.example.com
        ProxyPreserveHost On
        ProxyRequests Off
        ProxyPass / http://localhost:27633/
        ProxyPassReverse / http://localhost:27633/

        ErrorLog ${APACHE_LOG_DIR}/trilium/error.log
        CustomLog ${APACHE_LOG_DIR}/trilium/access.log combined
    
        # Web sockets
    RewriteCond %{HTTP:Connection} Upgrade [NC]
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteRule /(.*) ws://localhost:27633/$1 [P,L]

        # Lets encrypt
        RewriteEngine on
    RewriteCond %{SERVER_NAME} =tril.example.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

per @MetroWind comment, however I still see the error in the log after restarting apache. Would you have any idea how to fix that?

useful!

Related questions

v0.30.7 packaged server install -- client doesn't start hot 1
source:https://uonfu.com/
Github User Rank List