将trilium分享链接结合域名

-
2024-01-04

为了更好的结合访客统计和链接优雅,将docker compose里的nginx配置加了一个location,反代指向trilium的share,但是可能是因为用了cloudflare的CDN,127.0.0.1一直不行,最后用了内网IP。

   …………
   
     location /share/ {
        proxy_pass http://192.168.1.xx:port/share/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		#proxy_redirect http://192.168.1.xx:port/share/ https://molezz.net/share/;
    }
    
    ………………

molezz
https://molezz.net
公告

作为博客molezz.net的分支子域,快速分享和更新记录,挺优雅