Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The base_uri parameter in ./config/baikal.yaml does not work. #217

Open
ioogithub opened this issue Aug 11, 2024 · 1 comment
Open

The base_uri parameter in ./config/baikal.yaml does not work. #217

ioogithub opened this issue Aug 11, 2024 · 1 comment

Comments

@ioogithub
Copy link

I need to get baikal working from behind an apache reverse-proxy server.

Many docker apps contain a base_uri parameter that can easily allow this to work by creating a subdomain: http://localhost/baikal. Although baikal does have a base_uri subdomain field, it does not work with this image.

I set the base_uri '' to base_uri '/baikal', base_uri 'baikal', base_uri 'baikal/' etc. and none of them work. They all just end up breaking the admin page and then the baikal logs show these errors:

49#49 *1 /var/www/baikal/html/index.php is not found (2: no such file or directory), client: ip, server: , request: "GET /baikal/ HTTP/1.1, host, referet etc. Then I see the 404 message "GET /baikal/

51#51: *3 FastCGI send in stderr: "PHP message: LogicException: Request uri (/dav.php/calendars/users/default) is out of the base uri (baikal/dav.php/) in /var/www/baikal/vendor/sabre/http/lib/Request
...etc

So my first question is, how is this even supposed to work, setting the base_uri parameter after the file is created doesn't seem to do anything internally, is it supposed to work or is this just a placeholder for future configuration?

I also tried another approach to this issue, I tried stripping out the subdomain with apache. For example, I am migrating from the radicale docker image. It is well documented and they provide this code which works to do this for radicale. I modified it for baikal:

RewriteEngine On
    RewriteRule ^/baikal$ /baikal/ [R,L]

    <Location "/baikal/">
        ProxyPass        http://localhost:1234/
        ProxyPassReverse http://localhost:1234/
        RequestHeader    set X-Script-Name /baikal
    </Location>

It does not work however, all the images and page links are broken and still referring to the original url, after loading the admin login page and clicking submit you get a 404 error.

I can see many of the issues and discussions here are of users trying to get this docker image to work on a server behind reverse proxy. Has anyone successfully got the project to work behind an apache? Even putting aside the proxy and loading the page locally: 'http://localhost/baikai' does not work either, is it supposed to work or do each one of the systems inside the docker image also need to be configured?

@ckulka ckulka self-assigned this Sep 16, 2024
Copy link

This issue looks inactive, I will close it in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants