Joplin server

Operating system

Windows

Joplin version

3.1.24

Sync target

Joplin Server

What issue do you have?

我在ubuntu系统的docker安装了joplin server,并用apache2代理,通过 http://ip/joplin 已经可以正常访问和同步。现在卸载apache2,换成nginx代理,总是提示路径找不到,不知道哪里的问题,请指教,谢谢!
joplin.conf 如下:查了没有其它配置

server {
listen 80;
server_name my_ip;

location /joplin {
    proxy_pass http://localhost:22300;
    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_set_header X-Forwarded-Host $http_host;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Forwarded-Path $request_uri;
}

}

Log file

I have seen something similar to this before when using nginx to reverse proxy to a sub-folder of a domain rather than the root of a domain or sub-domain.

If your APP_BASE_URL contains the sub-folder "joplin" (e.g. APP_BASE_URL=https://example.com/joplin) and your nginx server block defines a redirect location of /joplin, when nginx passes the request to the server it appends /joplin and so the server sees the request as https://example.com/joplin/joplin, hence the path not found message.

I helped someone in the past by devising a rewrite in the nginx server block to stop the duplication. In their case the sub-folder was named "joplinServer" not "joplin".

See this post:

I am in no way an expert with regards to this. If anyone knows a better way please post here!!!

1 Like