What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.11
What app is this about: Cryptpad
Describe your issue
I tried to get the Cryptpad app running and I’m having issues with the pages on the sandbox domain. I can access the Cryptpad homepage without any problems, but as soon as I want to create a new document or access my profile, I get an error page with the message “blocked site”.
The installation went through without any issues, and after initial problems due to a missing certificate for the sandbox domain, everything seemed to be set up correctly. However, the error page remains, regardless of which browser and device I use.
When I directly access sandbox.cryptpad.domain.org, I end up on the Wanderer-Trails Page one of my other Yunohost apps. That doesn’t seem right and is certainly not the expected behavior from Cryptpad?
Since I’m not an expert with Yunohost and don’t know exactly how things work in the background, my thoughts are pure speculation. I have a rough idea of how Nginx works as a reverse proxy and think there might be an issue here.
I looked at the nginx configs of both apps (Wanderer, Cryptpad) and believe there is an error in the Cryptpad nginx-sandbox.conf. The relevant section looks like this:
location / {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 150m;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
location ^~ /cryptpad_websocket {
proxy_pass http://localhost:3003;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
Here, ports 3000 and 3003 are hardcoded and do not use the Yunohost variables.
In the Wanderer nginx.conf, it looks different:
proxy_pass http://127.0.0.1:__PORT__/;
proxy_set_header Connection '';
proxy_http_version 1.1;
proxy_read_timeout 360s;
Here, __PORT__
is used to utilize the variables set by Yunohost during installation.
When I check the config files of my Yunohost installation, the two apps have a collision on port 3000, which likely explains why I end up on the Wanderer page.
So my assumption is that the Cryptpad nginx-sandbox.conf is faulty and that the hardcoded ports need to be replaced with variables? Could that be correct, or is it another issue?
Share relevant logs or error messages
Nginx config on github: cryptpad_ynh/conf/nginx-sandbox.conf at master · YunoHost-Apps/cryptpad_ynh · GitHub
Wanderer config on github: