title: How to serve phpMyAdmin to localhost/phpMyAdmin instead of localhost:8080 using nginx in docker
body: <p>In my project, I am using Django and nginx, but I want to manage my cloud databases through phpmyadmin.</p>
  <p>Django is working fine but I can't do the same with phpmyadmin because it is running in apache at localhost:8080, when I want it to run in nginx at localhost/phpmyadmin.</p>
  <p>here is the docker-compose.yml</p>
  <pre><code>version: &quot;3.9&quot;
     
  services:
  
    web:
      restart: always
      build:
        context: .
      env_file:
        - .env
      volumes:
        - ./project:/project
      expose:
        - 8000
        
    nginx:
      restart: always
      build: ./nginx
      volumes:
        - ./static:/static
      ports:
        - 80:80
      depends_on:
        - web
  
    phpmyadmin:
      image: phpmyadmin/phpmyadmin:latest
      restart: always
      environment:
        PMA_HOST: &lt;host_address&gt;
        PMA_USER: &lt;user&gt;
        PMA_PASSWORD: &lt;password&gt;
        PMA_PORT: 3306
        UPLOAD_LIMIT: 300M
      ports:
        - 8080:80
  </code></pre>
  <p>and nginx default.conf</p>
  <pre><code>upstream django{
      server web:8000;
  }
  
  server{
      listen 80;
      location / {
          proxy_pass http://django;
      }
  
      location /pma/ {               
          proxy_pass http://localhost:8080/;                                 
          proxy_buffering off;                                     
      }
  
      location /static/ {
          alias /static/;
      }
  }
  </code></pre>
  <p>I hope somebody will be able to tell me how to make nginx work as a reverse proxy for the phpMyAdmin docker container.</p>
  <p>If some important information is missing please let me know.</p>