I have installed Cockpit in a subfolder on a shared hosting and followed the information provided in https://github.com/agentejo/cockpit/issues/704#issuecomment-405016371 to setup the paths. Now I am able to access the admin interface at https://mydomain.com/cockpit and everything seems to work. But I am not able to accss API. If I am not logged in, every request is redirected to the login and if I am logged in, every request returns status 404. I try to reach the api at https://…n.com/cockpit/api/… What am I doing wrong?
EDIT: Sorry, I had to shorten the last link as the forum allows new users only to post two links in a post. It should also start with mydomain…
Some more information about my setup:
- Cockpit is located at /home/user/public_html/dir/cockpit
- The document root points to /home/user/public_html
- A htaccess file is used to redirect everyting to “dir”
- I use a “defines.php” file like provided in the above link to avoid having “dir” in the URL
- If I remove the “defines.php”, the “dir” is in the url, but I can access the API.