laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
44.96k stars 4.89k forks source link

Using basic Docker config leads to Path not found: joplin/login (and many other CSS/JS elements not found) #6548

Closed sebastian-burlacu closed 2 years ago

sebastian-burlacu commented 2 years ago

Using http, not https. I'd expect if I put /joplin in APP_BASE_URL in .env, it should use it, but it doesn't work. Not sure what's happening here.

Here are docker commands to create postgres and joplin containers:

docker run -d --restart unless-stopped --name joplinpostgres -v joplindbdata:/var/lib/postgresql/data -e POSTGRES_USER=joplinpostgresuser -e POSTGRES_DB=joplinpostgresdb -e POSTGRES_PASSWORD=joplinpostgrespassword postgres
jsqlip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' joplinpostgres)
sed -i -E "s/^POSTGRES_HOST.*/POSTGRES_HOST=$jsqlip/" .env
docker run -d --restart unless-stopped --name joplin --env-file /root/containers/.env -p 22300:22300 joplin/server:latest

And here are the uncommented parts of the .env file:


APP_BASE_URL=http://server:22300/joplin
APP_PORT=22300

DB_CLIENT=pg
POSTGRES_PASSWORD=joplinpostgrespassword
POSTGRES_DATABASE=joplinpostgresdb
POSTGRES_USER=joplinpostgresuser
POSTGRES_PORT=5432
POSTGRES_HOST=172.17.0.5

Environment

Joplin version: 2.7.4 Platform: server OS specifics: Ubuntu 18.04

Log file

Failed navigation to http://server:22300/joplin/login

2022-06-01 19:08:14: [error] App: 404: GET /joplin/login: ::ffff:192.168.1.220: Path not found: joplin/login
2022-06-01 19:08:14: App: GET /joplin/login (404) (2ms)
2022-06-01 19:08:14: [error] App: 404: GET /joplin/css/bulma.min.css: ::ffff:192.168.1.220: Path not found: joplin/css/bulma.min.css
2022-06-01 19:08:14: App: GET /joplin/css/bulma.min.css (404) (2ms)
2022-06-01 19:08:14: [error] App: 404: GET /joplin/css/fontawesome/css/all.min.css: ::ffff:192.168.1.220: Path not found: joplin/css/fontawesome/css/all.min.css
2022-06-01 19:08:14: [error] App: 404: GET /joplin/js/jquery.min.js: ::ffff:192.168.1.220: Path not found: joplin/js/jquery.min.js
2022-06-01 19:08:14: [error] App: 404: GET /joplin/js/main.js: ::ffff:192.168.1.220: Path not found: joplin/js/main.js
2022-06-01 19:08:14: [error] App: 404: GET /joplin/css/main.css: ::ffff:192.168.1.220: Path not found: joplin/css/main.css
2022-06-01 19:08:14: App: GET /joplin/css/fontawesome/css/all.min.css (404) (6ms)
2022-06-01 19:08:14: App: GET /joplin/js/jquery.min.js (404) (6ms)
2022-06-01 19:08:14: App: GET /joplin/js/main.js (404) (7ms)
2022-06-01 19:08:14: App: GET /joplin/css/main.css (404) (7ms)

Successful navigation to http://server:22300/login still shows other pieces of the site not working.

2022-06-01 19:13:35: App: GET /login (200) (2ms)
2022-06-01 19:13:35: [error] App: 404: GET /joplin/css/bulma.min.css: ::ffff:192.168.1.220: Path not found: joplin/css/bulma.min.css
2022-06-01 19:13:35: App: GET /joplin/css/bulma.min.css (404) (3ms)
2022-06-01 19:13:35: [error] App: 404: GET /joplin/css/fontawesome/css/all.min.css: ::ffff:192.168.1.220: Path not found: joplin/css/fontawesome/css/all.min.css
2022-06-01 19:13:35: [error] App: 404: GET /joplin/js/jquery.min.js: ::ffff:192.168.1.220: Path not found: joplin/js/jquery.min.js
2022-06-01 19:13:35: [error] App: 404: GET /joplin/css/main.css: ::ffff:192.168.1.220: Path not found: joplin/css/main.css
2022-06-01 19:13:35: [error] App: 404: GET /joplin/js/main.js: ::ffff:192.168.1.220: Path not found: joplin/js/main.js
2022-06-01 19:13:35: App: GET /joplin/css/fontawesome/css/all.min.css (404) (4ms)
2022-06-01 19:13:35: App: GET /joplin/js/jquery.min.js (404) (4ms)
2022-06-01 19:13:35: App: GET /joplin/css/main.css (404) (4ms)
2022-06-01 19:13:35: App: GET /joplin/js/main.js (404) (5ms)
2022-06-01 19:13:35: [error] App: 404: GET /joplin/images/Logo.png: ::ffff:192.168.1.220: Path not found: joplin/images/Logo.png
2022-06-01 19:13:35: App: GET /joplin/images/Logo.png (404) (1ms)
sebastian-burlacu commented 2 years ago

Update: removing /joplin from APP_BASE_URL fixes this issue. So this might just be a documentation thing.

github-actions[bot] commented 2 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

github-actions[bot] commented 2 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.

leonlamsz commented 1 year ago

Here is my work nginx configuration for your reference:

location /joplin/ {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://localhost:22300/;

    }
error420 commented 6 months ago

Update: removing /joplin from APP_BASE_URL fixes this issue. So this might just be a documentation thing.

Thank you. This fixed it for me.