linuxserver / docker-swag

Nginx webserver and reverse proxy with php support and a built-in Certbot (Let's Encrypt) client. It also contains fail2ban for intrusion prevention.
https://docs.linuxserver.io/general/swag
GNU General Public License v3.0
2.87k stars 246 forks source link

config for trilium #29

Closed faspina closed 2 years ago

faspina commented 3 years ago

linuxserver.io


Expected Behavior

When I add and delete pages to Trilium, I don't immediately see the change I have refresh the pages. When I access the site on the lan it works fine. I need a updated NGINX config file , per haps something that updates websockets

Nginx config file

# make sure that your dns has a cname set for grafana and that your grafana container is not using a base url

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name notes.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /login;

        include /config/nginx/proxy.conf;
        set $upstream_app trilium;
        set $upstream_port 8080;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
#        proxy_set_header X-NginX-Proxy true;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
#        proxy_set_header Host $host;
#        proxy_redirect off;
#        proxy_set_header X-Forwarded-Proto $scheme;
#        proxy_set_header X-Real-IP $remote_addr;
#        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

    }
}
github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

aptalca commented 3 years ago

Please post your conf with proper formatting, or post it on pastebin or the like and link it here

faspina commented 3 years ago

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name notes.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /login;

        include /config/nginx/proxy.conf;
        set $upstream_app trilium;
        set $upstream_port 8080;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
#        proxy_set_header X-NginX-Proxy true;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
#        proxy_set_header Host $host;
#        proxy_redirect off;
#        proxy_set_header X-Forwarded-Proto $scheme;
#        proxy_set_header X-Real-IP $remote_addr;
#        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

    }
}
github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.