Baikal troubleshooting
From wikinotes
Hosting on Route
Example domain.com/your/route
.
Apparently this is possible with apache, but my attempts with nginx were unsuccessful.
Reading baikal's source code, in particular $_SERVER[]
references (which refers to http headers)
was very helpful for configuring the reverse proxy.
Reverse Proxy Setup (HTTP/HTTPS)
Baikal uses the HTTP_HOST http header to determine resource paths (css, images, ...).
In nginx, I was able to solve this as follows:
location / {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-Ip $remote-addr;
proxy_set_header X-Forwarded-Host domain.com:8080;
proxy_set_header Authorization $http_authorization;
proxy_set_header Host domain.com:8080;
proxy_pass http://10.10.10.10:8080;
}
I used curl -i
and chromium's developer tools to help identify the problem.
401 Unauthorized
- Confirm that your client is using the same Authorization scheme as Baikal. (ex: Basic/Digest).
Navigate to baikal's Settings page to see your authorization scheme.
- If you are behind a reverse proxy, confirm that you are forwarding the Authorization HTTP header.
502 Gateway Error
Generally, this is caused by /var/run/php-fpm.sock
ownership being incorrect.