KB00008:PartKeepr behind a reverse proxy
PartKeepr behind a reverse proxy
Sometimes it's required to run PartKeepr behind a reverse proxy. Depending on your setup, there are two possibilities. In this example,
http://internal-partkeepr/ could run on an internal virtual machine, not accessible from the outside.
- Run PartKeepr on the same path (e.g.
- Run PartKeepr on a different path (e.g.
The first case is simple, nothing needs to be done in that case - this should work with all PartKeepr versions.
https://example.org/parts/ and would generate links like
https://example.org/ - now the user's browser can't find them.
Starting from PartKeepr 1.4, it is possible to configure a fixed external URL to solve that problem.
To configure it, you need to make two settings.
app/config/parameters.php file, add the following line where you configure the first external url:
Additionally, create a file called
app/config/config_custom.yml and configure your external url as well. Note the proper indentation!
framework: assets: base_urls: - 'https://www.example.org/parts/'
Now re-run setup or re-generate your environment and you should see that the generated URLs in the PartKeepr frontend all begin with the url you've set.
It is important to note that this only works in the production environment - it will not work in the dev environment!