HTTP Autorization issues with PDF Viewer

I have some issues with the PDF Viewer on my Nextcloud installation. I host my Nextcloud at Cloudways, where I created a PHP Stack application with MySQL on a Digital Ocean instance with 1GB. Iā€™m running 11.0.2 (stable).

I uploaded the Nextcloud setup and unzipped it. Install didnā€™t give me any errors, I just had to change the permission of the folders ā€œappsā€ and ā€œconfigā€. I changed the permissions of these folder to 775 using Filezilla. I chose MySQL as database.

I can access Nextcloud using the application URL, that Cloudways provides. Uploading, downloading and renaming files, playing the Nextcloud.mp4, previewing the photos, all works fine. Overall it seems to be working good.
Only exception is that I canā€™t view the ā€œNextcloud Manual.pdfā€ file. I get an HTTP authorization window where I have to enter username and password. Downloading the file through the menu works. I have no idea what credentials are needed there.

When I click cancel, the PDF Viewer starts to load and I get following error:

PDF.js Version 1.4.20 (build: b15f335)
Nachricht: Unexpected server response (401) while retrieving PDF ā€œhttp://phpstack-******************.cloudwaysapps.com/remote.php/webdav/Nextcloud%20Manual.pdfā€.

When I go back to the file overview of Nextcloud, I get the message: ā€œProblem loading page, reloading in 5 secondsā€ and Iā€™m redirected to the login page.

When I try to access the file with disabled PDF Viewer, I get the same HTTP authorization window. When I the click cancel button, Iā€™m redirect to a page saying:

Nextcloud
Unauthorized

Technische Details

Entfernte Adresse: 127.0.0.1
Anfragekennung: /WcPy4x6pq9ymLc6P03D

When I go back to the file overview of Nextcloud, I also get the message: ā€œProblem loading page, reloading in 5 secondsā€ and Iā€™m redirected to the login page.

The log shows the following entry:

Warning core Login failed: ā€˜ā€™ (Remote IP: ā€˜127.0.0.1ā€™)

I think that itā€™s not a big deal to solve this, but I donā€™t know how to fix it. Maybe you guys can send me in the right direction. FYI, I didnā€™t change anything in the config.php and in the .htaccess yet. I could only add one image because Iā€™m a new user. I created some screenshots and put them together in one image. Hope that helps.

I am having similar issues with Nextcloud on Cloudways.

Did you happen to find a fix? When I do the install on other shared hosting it works fine but on Cloudways I have tried multiple times and also have these permission issues when I can not view or upload some types of files like pdfā€™s and then get kicked out and have to log back in.