Describe the bug
Running in docker container, behind reverse proxy, under specific directory. Upon successful log in, redirects to server root instead of set base directory
phpIPAM version
1.4.1
Your Environment (please supply the following information):
- phpIPAM version: 1.4.1
- OS: Alpine Linux 3.10.5
- PHP version: 7.3.14
- Webserver: Apache 2.4.43
- Database: MariaDB 10.4.12
(official docker images phpipam/phpipam-www;latest and mariadb:latest)
Steps To Reproduce
- Create docker private bridge:
docker network create ipam-net
- Create MariaDB container :
docker run --name mariadb \
-e MYSQL_ROOT_PASSWORD=... \
-v /opt/docker/phpipam/mysql:/var/lib/mysql \
--network ipam-net \
-d mariadb:latest
- Create phpipam container :
docker run --name phpipam \
-e TZ=Europe/Brussels \
-e IPAM_BASE=/ipam/ \
-e IPAM_DATABASE_HOST=mariadb.ipam-net \
-e IPAM_DATABASE_USER=root \
-e IPAM_DATABASE_PASS=... \
--network ipam-net \
-p 8001:80 \
-d phpipam/phpipam-www:latest
- Configure NGinX reverse proxy :
location /ipam/ {
rewrite /ipam/(.*) /$1 break;
proxy_pass http://127.0.0.1:8001;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
- Log in on the system
Screenshots and error logs
N.A.
Additional Info
Running behind reverse proxy (see above).
When trying to debug using Firefox developer tools (F12 in browser), the symptoms disappear !!! On the other side, the behavior is reproduced systematically when no debugging is taking place in the browser.
After being redirected to the root of the webserver (https://webserver/), manually going to the correct URL (https://webserver/ipam/) connects to a logged-in session and work can proceed normally. The abnormal behavior is only triggered on the log-in page.
Describe the bug
Running in docker container, behind reverse proxy, under specific directory. Upon successful log in, redirects to server root instead of set base directory
phpIPAM version
1.4.1
Your Environment (please supply the following information):
(official docker images phpipam/phpipam-www;latest and mariadb:latest)
Steps To Reproduce
Screenshots and error logs
N.A.
Additional Info
Running behind reverse proxy (see above).
When trying to debug using Firefox developer tools (F12 in browser), the symptoms disappear !!! On the other side, the behavior is reproduced systematically when no debugging is taking place in the browser.
After being redirected to the root of the webserver (https://webserver/), manually going to the correct URL (https://webserver/ipam/) connects to a logged-in session and work can proceed normally. The abnormal behavior is only triggered on the log-in page.