Sitelet https://github.com/phpmyadmin/docker/issues/350
Skip to content

docker fpm-alpine image with apache reverse proxy #350

Description

@d3xt3r01

Describe the bug

The default security.limit_extensions in php-fpm.d/www.conf doesn't allow the php-fpm to serve the other files.

To Reproduce

Use this docker-compose

# cat docker-compose.yml
version: "3.8"
services:
  mariadb:
    image: 'mariadb:10.5.13'
    restart: always
    hostname: 'mariadb'
    environment:
      MYSQL_ROOT_PASSWORD: 1234
    volumes:
      - './volumes/mariadb/varlibmysql:/var/lib/mysql'
    ports:
      - 192.168.1.2:3307:3306
    networks:
      mariadb:
  phpmyadmin:
    image: 'phpmyadmin:5.1.1-fpm-alpine'
    restart: always
    hostname: 'phpmyadmin'
    ports:
      - 127.0.0.1:9180:9000
    environment:
      - HIDE_PHP_VERSION=true
      - PMA_ABSOLUTE_URI=http://phpmyadmin.local.lan/
    networks:
      mariadb:

networks:
  mariadb:
    driver_opts:
      com.docker.network.bridge.name: br-mariadb
# cat local.lan.conf
        <VirtualHost 192.168.1.2:80>
                ServerName phpmyadmin.local.lan
                DirectoryIndex index.php
                ProxyPass / fcgi://127.0.0.1:9180/var/www/html/
                ProxyPassReverse / fcgi://127.0.0.1:9180/var/www/html/
        </VirtualHost>

Expected behavior

The UI to appear

Screenshots

The text "File not found."

Docker Logs

NOTICE: Access to the script '/var/www/html/themes/pmahomme/jquery/jquery-ui.css' has been denied (see security.limit_extensions)
192.168.128.1 -  21/Dec/2021:17:51:20 +0000 "GET /themes/pmahomme/jquery/jquery-ui.css" 403
NOTICE: Access to the script '/var/www/html/js/vendor/codemirror/lib/codemirror.css' has been denied (see security.limit_extensions)
192.168.128.1 -  21/Dec/2021:17:51:20 +0000 "GET /js/vendor/codemirror/lib/codemirror.css" 403
NOTICE: Access to the script '/var/www/html/js/vendor/codemirror/addon/hint/show-hint.css' has been denied (see security.limit_extensions)
....

Server configuration

  • Operating system: gentoo
  • Web server: apache reverse proxy
  • Database version: mariadb-10.5.13
  • PHP version: 7.4.27
  • phpMyAdmin version: 5.1.1

Client configuration

any ... cli/UI

Additional context

The documentation doesn't say anything about the apache reverse proxy so... I think we also need an example for apache. For example the /var/www/html is needed to be appended to the proxypass took me a little bit to figure out.
Maybe also something to redirect / to index.php? in my solution / still says File not found.
Chrome refuses to show everything probably because of X-Content-Type-Options which if forcely removed will still cause it to render weirdly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions