One of the cool tools you may run inside your home lab is phpIPAM. The phpIPAM solution is a great little tool that allows you to keep track of your IP addresses not only in your home lab but even production environments. It is free and open source and you can easily spin it up inside Docker containers. You can read my walkthrough on how to spin it up in Docker here: Mastering phpIPAM Docker - The Ultimate Setup Guide.
However, if you just try to put phpIPAM behind a reverse proxy like Traefik or Nginx Proxy Manager, you may run into an issue where when you browse to the page, it isn't loading all the stylesheets and is basically just a white page with the text on it.
It will look like the below:
If you pull up the browser console, you will see tons of mixed content errors.
Why is this error happening when the proxy is supposed to be forwarding all traffic to SSL? Also, in Nginx Proxy Manager, I had the "force SSL" turned on for the proxy host. But, still an error.
As it turns out the resolution is quite simple. It is just an additional parameter in the Docker Compose code for the phpIPAM web container called IPAM_TRUST_X_FORWARDED=true.
phpipam-web: image: phpipam/phpipam-www:latest ports: - "8100:80" environment: - TZ=America/Chicago - IPAM_DATABASE_HOST=phpipam-mariadb - IPAM_DATABASE_PASS=password - IPAM_DATABASE_WEBHOST=% - IPAM_TRUST_X_FORWARDED=true restart: always volumes: - "/home/linuxadmin/homelabservices/phpipam/phpipam-logo:/phpipam/css/images/logo" - "/home/linuxadmin/homelabservices/phpipam/phpipam-ca:/usr/local/share/ca-certificates:ro" networks: - nginxproxy depends_on: - phpipam-mariadb container_name: phpipam-web
Once I did this I was able to refresh the page (you may need to clear your cache or check in an incognito tab) and phpIPAM loaded normally without JQUERY errors.