I
I
Ivan2017-11-01 22:25:51
PHP
Ivan, 2017-11-01 22:25:51

How to connect PHPMyAdmin to Nginx in Docker?

I'm tinkering with Docker, I want to make a PHP server for development. It seems that PHP + NGINX + MySQL has adjusted everything, but I want to screw PHPMyAdmin. Now it opens for me conditionally at http://192.168.99.100:8080, and I want it to be 192.168.99.100/phpmyadmin
The third day I'm already dancing with a tambourine ...
GitHub

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Fixid, 2017-11-01
@Fixid

proxy_pass to 192.168.99.100:8080
proxy_redirect off

A
Andrey Stepanov, 2017-11-03
@leoykt

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://192.168.99.100:8080;
proxy_redirect off;
proxy_buffering off; 
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question