Passwords_handbook page not found

Hi,

I’m using NC27.1.4, nginx 1.25.2, pgsql 15.5, php 8.2.13

After installing the passwords_handbook app, going to passwords → More → handbook it says "Unable to fetch page: Invalid content type application/octet-stream.

I noticed in the admin passwords settings the page should be https://my.nextcloud.com/apps/passwords_handbook/handbook/ but going to that URL it says “Page not found or you don’t have permission to view the page”

I also verified that the app did install the website files under /app/passwords_handbook/handbook on the server.

I’m not seeing any issue in the nextcloud or webserver error logs.
Is there suppose to be some web server configuration that I’m missing?

Try this URL:
https://my.nextcloud.com/apps/passwords_handbook/handbook/Index.md
and check the content type of the response. It should be text/plain or text/markdown

Here is how this url should look on the test server: https://next.passwordsapp.org/apps/passwords_handbook/handbook/Index.md

Unfortunately it goes straight to trying to download the file rather than interpret it.

The file is Index.md shouldn’t it be index.md?

Then i would guess that this is the issue.
The server should deliver the file with one of the two content types i mentioned.

You can also use an app like Postman or Insomnia to debug the response.

My question is have you or someone else tried parsing md files in nginx? Is there some module or additional setting that is required?

The server shouldn’t do anything with the files. The handbook app returns a file response which has text/plain set as response type.

The server should return that response to the client as is and without changing the content type.

So if your server does not respond like the text server i posted, then it’s doing something wrong.

I gotcha now.

So in the nextcloud site file for nginx, I had to add in the types {} section
text/plain md;

types {
    text/javascript js mjs;
    text/markdown md;
}

Now it renders correctly.

Do note that this not part of the default recommendation for nextcloud server setup with nginx NGINX configuration — Nextcloud latest Administration Manual latest documentation

So unless nginx users make this change, the webserver wont know how to treat the md file by default.

So unless nginx users make this change, the webserver wont know how to treat the md file by default.

As i said, they shouldn’t really have to. The passwords handbook app sends a file type with the response.

Maybe check if your nginx setup includes the mime types correctly:

    include       /etc/nginx/mime.types;

There should be something like this somewhere in the config;

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
}

I see…looking in the mime.type file there is no entry for md;

I had to build nginx from source so I have no idea if this is in the regular ubuntu package or not.

I use the nginx alpine docker image with the nextcloud nginx config and the nextcloud fpm image and it works OOTB. The test server uses the nextcloud apache image where it also works OOTB.
So i would guess that it is expected to work OOTB.

Only in my HTTPS-Proxy, where i override the entire Nginx config i have this configured.

Anyway i also just pushed an update for the handbook app which adds an informative error message in admin settings if the configured URL doesn’t work as expected.