I normally host all my softwrae behind an apache https terminating reverse proxy. This works fine for SuiteCRM 7.x but so far I failed to set this up for SuiteCRM 8.3.0.
At first I thought I had the same issues as the person in this topic (Unable to login as admin user after CLI installation of 8.3.0 ), but that is not the issues.
I was able to setup SuiteCRM 8.3.0 succesfully without using a reverse proxy on an Ubuntu 20.04 LTS server without any issues.
But, when I try to get the reverse proxy in place the symptoms are very similar as to what is mentioned in the topic above.
I did not find any particular instructions for using a reverse proxy for SuiteCRM, so I looked at the instructions for the Symfony framework and added the following to config/packages/framework.yaml:
framework:
trusted_proxies: 192.168.50.9
trusted_headers: [‘x-forwarded-for’, ‘x-forwarded-host’, ‘x-forwarded-proto’, ‘x-forwarded-port’, ‘x-forwarded-prefix’]
But that results in a white screen and 404 errors on the js files being loaded from https://crm …/dist)
Any pointers on how to install SuiteCRM behind a reverse proxy?
As it turns out, you don’t have to change the framework.yaml file at all.
What ultimately went wrong (for me on Ubuntu 20.04LTS) is that the rewrite cond to check if a file exists is not correct.
I had to change it from:
RewriteCond {REQUEST_FILENAME} !-f
to
RewriteCond %{DOCUMENT_ROOT}% {REQUEST_FILENAME} !-f
joho
8 September 2023 10:23
3
Trying to get 8.3.1 running, fresh install, on http://127.0.0.1/suitecrm (i.e. a sub-folder).
Running into the api/graphql error with invalid CSRF token. There seems to be no solution.
@joho Please try this, and post back your results:
salesagility:hotfix
← chris001:patch-4
opened 09:54PM - 19 Feb 24 UTC
## Description
When using the v8 application behind a load balancer, th… e requests come in as `http`, even when the application is installed with `https` enabled. This causes login failure.
This change causes the `http` request from the proxy to be rewritten as `https` so that the application's security requirement for login is satisfied. The application allows login only from `https`.
## Motivation and Context
Login should be working now, when running v8 behind a `http` proxy or load balancer (e.g. Kubernetes, Helm Charts).
Bitnami should undo its deprecation of SuiteCRM v8 from the list of supported Helm Charts applications.
## How To Test This
Install v8 application behind a http proxy or load balancer, without the changes.
Try to login. It should fail with a variety of error messages.
Apply the changes. Login should work fine.
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
### Final checklist
- [x] My code follows the code style of this project found [here](https://docs.suitecrm.com/community/contributing-code/coding-standards/).
- [x] My change requires a change to the documentation.
- [x] I have read the [**How to Contribute**](https://docs.suitecrm.com/community/contributing-code/) guidelines.