Nginx Reverse Proxy to LAMP server phpmyadmin access

Carlos nginx-forum at nginx.us
Wed May 16 10:19:09 UTC 2012


Hi all.

I have been looking for this answer but I have not been able to do so.

I have a server with Nginx as a reverse proxy and want it to redirect my
http://domain.com/phpmyadmin to a different LAMP server which host
phpmyadmin.

Somehow my configuracion is not working:

server {
  listen 80;
  server_name DOMAIN.COM;

  location / {
    proxy_pass http://LAMP;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
  }

  location /phpmyadmin {
    proxy_pass http://LAMP/phpmyadmin;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
  }

Can anybody please guide me?

Thank you in advance.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,226490,226490#msg-226490



More information about the nginx mailing list