Open damien-carcel opened 7 years ago
A very simple solution to this problem is to use a reverse proxy on the host machine. This should be added to the documentation.
server {
listen 80;
server_name domain.local;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
access_log /var/log/nginx/domain.access.log combined;
error_log /var/log/nginx/domain.error.log;
}
When running both akeneo and akeneo-behat environments through one compose file (akeneo on localhost:8080 and akeneo-behat on 8081), when a user logs in one environment, he/she is disconnected from the other one.
The problem is observed with both Apache + mod_php and Apache (FCGI) + FPM
Solution
The easiest way to handle this is to use a reverse proxy on the host machine. This should be documented.
Example with Apache, assuming the Docker container is mapped on port
8080
and we want to redirect it on the domain namepim-ce.local
:We could also use Traefik.