I am not sure this the best practices for the project, so be kind !
On my laptop for the simulation (Ubuntu 20.4), but this is the same interactions on a remote server.
I have 2 distinct Symfony APIs (ApiPlatform), api1 and api2 running with docker-compose so 6 containers (api1_php-fpm, api1_nginx, api1_mariadb, api2_php-fpm, api2_nginx, api2_mariadb).
I have one server host with an Apache Server that redirect connections via ProxyPass
... # API 1 ProxyPass /api1 http://127.0.0.1:8787 ProxyPassReverse /api1 http://127.0.0.1:8787 # API 2 ProxyPass /api2 http://127.0.0.1:8989 ProxyPassReverse /api2 http://127.0.0.1:8989
When the APIs are docker-compose up, I can contact them via http://localhost:8787/api and http://localhost:8989/api thanks to docker configuration ports.
My wish is to contact the APIs with the specific URLs defined in the
apache2.conf : http://localhost/api1/api or http://localhost/api2/api.
But they cannot find the correct path to their resources (see below).
What is the config I have to change ? Apache Host, Apache in docker php-fpm, Nginx in docker nginx ?
Thanks for reading.
Source: Symfony Questions
Was this helpful?
0 / 0