I followed the instructions to run Volto and the backend in Docker containers, but instead using nginx i'm using Apache in front running on a different server. I struggled a bit the configuration and ended in getting mixed content http and https.
I solved this by using RAZZLE_API_PATH but to be honest i just assume this enforce the fronend to generate URLs using the value provided in my docker-compose file.
Is my following configuration best practise or did i find just a workaround to mitigate this configuration issue?
Further i would like to get access to my backend configuration through my frontend. I have seen in a introduction video i could use https://www.example.com/api. But this is probably not seamless. I can access my backend using https://www.example.com/++api++/@@overview-controlpanel. But any provided link send me to https://www.example.com/@@<something> without using ++api++ inside. But i can reach the configuraiton sites putting them in direcly instead.
Connecting in this way gives me a warning "You have accessed the Plone backend through its Classic UI frontend." which looks different to the video tuturial i have seen.
apache-config
<VirtualHost *:443>
ServerAdmin webmaster@example.com
Servername www.example.com
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/www.example.com-cert.pem
SSLCertificateKeyFile /etc/apache2/ssl/www.example.com-key.pem
SSLCertificateChainFile /etc/apache2/ssl/www.example.com-chain.pem
ProxyPreserveHost On
RewriteEngine On
SSLProxyEngine On
<IfModule mod_rewrite.c>
RewriteRule ^/\+\+api\+\+($|/.*) http://192.168.1.5:8080/VirtualHostBase/https/%{HTTP_HOST}:443/example_com/++api++/VirtualHostRoot/$1 [P,L]
RewriteRule ^/(.*) http://192.168.1.5:3000/$1 [L,P]
</IfModule>
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
ErrorLog /var/log/apache2/www.example.com-error.log
LogLevel warn
CustomLog /var/log/apache2/www.example.com-access.log combined
ServerSignature Off
</VirtualHost>
Yes, that's correct. With Seamless mode Volto will use the public IP for the json API endpoints, and that's why you need the ++api++ rewrite rules, so that your web server proxy knows to use the Plone backend for them.
Indeed, giving access from the frontend to my reverse proxy solved it, thanks a lot. If i run docker logs frontend i'm a bit surprised, yes, it's running seamless but why it proxying to /Plone?
Volto is running in SEAMLESS mode
Proxying API requests from http://localhost:3000/++api++ to http://localhost:8080/Plone
🎭 Volto started at 0.0.0.0:3000 🚀
That's the default, Volto as a disconnected entity doesn't know where the Plone site path is in Zope. In development, if you have a non-standard scenario, you use something like: