Nginx Reverse Proxy to LAMP server phpmyadmin access

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

Dear all …

The above configuration (first part only needed)… was correct

This one:

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

Just was a mistake with my DNS.

Thanks!

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