• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

phpMyAdmin behind HAProxy

Scheduled Pinned Locked Moved Cache/Proxy
2 Posts 1 Posters 230 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    codechurn
    last edited by codechurn Apr 26, 2025, 10:19 PM Apr 26, 2025, 10:07 PM

    I have phpMyAdmin running on a backend server on port 80 at /phpmyadmin. I want my backend to append the /phpmyadmin to any requests.

    This is what my backend setup looks like:
    c4bb7b72-132b-48c0-8b78-8f81d74646cd-image.png

    If I go to https://phpmyadin.somedomain.org it correctly routes me to my backend and displays the logon page.

    However, when I attempt to login, I get a cookie error and the path in the browser address is not updated to include the /phpmyadmin. I suspect that I am missing something here with respect to the client maybe rewriteing the path when I click the logon button?

    a831643d-6936-4fb2-a252-78aba7317c4f-image.png

    If I manually add /phpmyadmin to the path above (ie: /phpmyadmin/index.php) I am succesfully logged in

    As you can see, from the rules I have a similar configuration for pgadmin and icinga which work without issue.

    C 1 Reply Last reply 12 days ago Reply Quote 0
    • C
      codechurn @codechurn
      last edited by codechurn 12 days ago 12 days ago

      I was able to solve the issue by shifting the redirect rules for phpmyadmin to the frontend instead of trying to path it out on the backend. This resolved the issue for me.

      Front End
      e80ffba8-07fd-4520-8b54-abf5e3bdff8e-image.png

      dd4aa560-b111-4f7a-8489-ef46975a5039-image.png

      Since the pathing now happens in the front end, I was able to clean up the backend and it's just a simple passthrough in the case of phpmyadmin.

      Hopefully, this helps someone else out too. There's probably a more elegant way to solve this, but it did the trick for me.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        [[user:consent.lead]]
        [[user:consent.not_received]]