# Joplin server

**URL:** <https://discourse.joplinapp.org/t/joplin-server/42151>\
**Category:** Support\
**Created:** [23 November 2024 15:55 UTC](https://discourse.joplinapp.org/t/joplin-server/42151 "2024-11-23T15:55:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![henry](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@henry](https://discourse.joplinapp.org/u/henry)\
**Post date:** [23 November 2024 15:55 UTC](https://discourse.joplinapp.org/t/joplin-server/42151/1 "2024-11-23T15:55:10Z")

</div>

### 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](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

 ![path.jpg](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/5/b/5baf1cc4f8304fbdd80c89f6213aae5709fbe443.jpeg)

---

<div class="post-metadata">

**Author:** ![dpoulton](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/dpoulton/32/29723_2.png) [@dpoulton](https://discourse.joplinapp.org/u/dpoulton)\
**Post date:** [23 November 2024 17:53 UTC](https://discourse.joplinapp.org/t/joplin-server/42151/2 "2024-11-23T17:53:36Z")

</div>

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:

> [@Joplin Server and Nginx under subresource and HTTPS](https://discourse.joplinapp.org/t/joplin-server-and-nginx-under-subresource-and-https/25934/17):
>
> I think that the problem lies with the nginx setup and not Joplin as what you are asking for is basically the Joplin Server base path environment variable. It's just that nginx adds to it. Try this: In your .env file set APP\_BASE\_URL=https://myRaspi/joplinServer as well as any other variables. or forget the .env file and just use the docker-compose file. version: '3' services: db: restart: unless-stopped image: postgres:13.1 ports: - "5432:5432" …

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [23 December 2024 17:54 UTC](https://discourse.joplinapp.org/t/joplin-server/42151/3 "2024-12-23T17:54:25Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
