Joplin Server Install: The requested URL was not found on this server

Hello All,

OS Version: Rocky Linux 8.5
Joplin Server: 2.7.4

Thanks in advance for any responses. I am a first time consumer of Joplin Server and am attempting to setup Joplin Server using docker-compose as seen on Git. I have the docker-compose.yml file configured as follows:

# This is a sample docker-compose file that can be used to run Joplin Server
# along with a PostgreSQL server.
#
# All environment variables are optional. If you don't set them, you will get a
# warning from docker-compose, however the app should use working defaults.

version: '3'

services:
    db:
        image: postgres:13
        volumes:
            - ./data/postgres:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=[password]
            - POSTGRES_USER=joplin
            - POSTGRES_DB=${POSTGRES_DATABASE}
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=${APP_BASE_URL}
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=[password]
            - POSTGRES_DATABASE=${POSTGRES_DATABASE}
            - POSTGRES_USER=joplin
            - POSTGRES_PORT=${POSTGRES_PORT}
            - POSTGRES_HOST=db

When starting and testing the container, it appears to start properly:


[root@cloud1 docker]# curl localhost:22300/api/ping
{"status":"ok","message":"Joplin Server is running"}[root@cloud1 docker]#

I have Apache reverse proxy configured (possibly incorrectly), using the following configuration:

/etc/httpd/conf/joplin.conf


<VirtualHost _default_:80>

    ProxyRequests Off
    ProxyPreserveHost On
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off

    ProxyPass / localhost:22300
    ProxyPassReverse / localhost:22300

</VirtualHost>



<VirtualHost _default_:443>

    ProxyRequests Off
    ProxyPreserveHost On
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off

    ProxyPass / localhost:22300
    ProxyPassReverse / localhost:22300

</VirtualHost>


<Proxy "*">
  Require ip 192.168.0
</Proxy>

The issue lies when attempting to reach the cloud1/joplin, or cloud1/joplin/login web pages. These pages return:

# Not Found

The requested URL was not found on this server.

I will note that navigating to just cloud1/ will properly return the Apache test web page as expected. It seems that Apache is not able to reach the Joplin server resource. Has anyone run into something similar?

Please note I had to remove 'http://' from all urls in order to submit the post.

I use nginx, so can’t provide precise guidance. However, your proxy pass set to / not /joplin.

Appreciate the reply. After poking around a bit more, I am able to reach cloud1:22300/login and successfully login after making the below changes:

<VirtualHost _default_:80>
    ProxyPass /joplin http://localhost:22300
    ProxyPassReverse /joplin http://localhost:22300
ProxyPass /joplin http://localhost:22300 ProxyPassReverse /joplin http://localhost:22300

- APP_BASE_URL=http://cloud1:22300

I am a bit perplexed though as the documentation on Git seems to indicate that I need the APP_BASE_URL to include /joplin at the end of the line, however the site does not load properly unless I remove the /joplin. I am also still unable to load /joplin and /joplin/login as indicated on Git. I suppose this may be related to not having /joplin appended to the APP_BASE_URL.

I think the documentation is for hosting on a bare domain or sub domain, and not a sub folder. Also, if you’re only using Joplin on a local server why do you need a proxy? That’s why http://cloud1:22300/login is working.

If you had a FQDN, e.g., joplin.cloud1.com, the config should work (without /joplin). However, you have added Joplin to a server that’s already serving content from /.

This is what I’d do in nginx (I proxy a number of services, but not Joplin as I prefer to use Joplin Cloud) and it’s the same principle. For simplicity, I’m only showing http.

server {
  listen 80;
  server_name joplin.mydomain;

  access_log /var/log/nginx/joplin_access.log;
  error_log /var/log/nginx/joplin_error.log;

  location / {
    proxy_pass http://127.0.0.1:22300
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}

Appreciate the reply. I was only trying to setup the proxy because the instructions listed steps to setup Apache/Nginx. I didn't realize the app would work fine without the proxy configured. I stopped the httpd service and am still able to reach http://cloud1:22300/login. Currently I only plan to use/test the app on my local network so this should be OK.

1 Like

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