Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Cannot access both akeneo and akeneo-behat containers at the same time #67

Open
damien-carcel opened this issue Nov 21, 2016 · 2 comments

Comments

@damien-carcel
Copy link
Contributor

damien-carcel commented Nov 21, 2016

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Affected image and tag new one

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 name pim-ce.local:

<VirtualHost *:80>
    ServerName pim-ce.local

    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>

We could also use Traefik.

@damien-carcel
Copy link
Contributor Author

A very simple solution to this problem is to use a reverse proxy on the host machine.
This should be added to the documentation.

@damien-carcel
Copy link
Contributor Author

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;
}

@damien-carcel damien-carcel removed their assignment Jun 10, 2017
@damien-carcel damien-carcel changed the title Cannot use both akeneo and akeneo-behat images at the same time Cannot access both akeneo and akeneo-behat containers at the same time Jun 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant