Question

phpmyadmin problem nginx reverse proxy

  • Posted on October 11, 2013
  • xpbazsiAsked by xpbazsi

I configured nginx with apache2. it seems works, but I can not log in. it shows me the site is unavailable when I type my password and submit. then I retype mydomain/phpmyadmin/ once again I logged into the admin. How is it possibe?

phpmyadmin nginx block:

location ~* ^/phpmyadmin { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://127.0.0.1:8080; client_max_body_size 10m; client_body_buffer_size 128k;

proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;

proxy_buffer_size 32k;
proxy_buffers 8 16k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;

}

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I just spent a good long while trying to get this to work on my setup. Basically exactly the same with an Nginx reverse proxy onto an apache backend with phpmyadmin in a subdirectory. <br> <br>The thing that fixed it for me was to set the phpmyadmin config variable <br> <br>$cfg[‘PmaAbsoluteUri’] <br> <br>to the url that your users should see. In my case it was something like <br> <br>$cfg[‘PmaAbsoluteUri’] = ‘https://example.com/pma/’; <br> <br>I did manage to get Nginx to rewrite the redirects correctly in order to let me in but I found phpmyadmin was riddled with links that were incorrect so I figured fixing my Nginx configuration was not the solution.

it didnt like that last code block as… <br>in the 000-default file edit the [VirtualHost *] instead of [VirtualHost *:8080] <br>the [ ] and suppose to be angle brackets btw

The problem is that your apache virtual host is named *8080 <br>In your ports.conf change it to; <br>NameVirtualHost * instead of NameVirtualHost *:8080 or whatever it is. Keep the Listen 8080 part <br>Next go into sites-enabled and edit your 000-default and edit the line <VirtualHost *> instead of <VirtualHost *:8080> <br>restart apache