Closed woosungchoi closed 4 years ago
Hi @woosungchoi
I did not test your configuration due to a lack of time but what would you describe as "not working" ?
Hi @woosungchoi
I did not test your configuration due to a lack of time but what would you describe as "not working" ?
@williamdes The container runs fine. However, when I connect, I get a 404 error.
Hi @woosungchoi I did not test your configuration due to a lack of time but what would you describe as "not working" ?
@williamdes The container runs fine. However, when I connect, I get a 404 error.
I would recommend you to change root /var/www/html/phpmyadmin;
into root /var/www/html;
because of phpmyadmin:/var/www/html
and
https://github.com/phpmyadmin/docker/blob/9d66e78f8a442fcdf3e8379eb23fd12e26110ee1/Dockerfile-debian.template#L101
@williamdes It works! thx!
version: '3'
services:
db:
image: mariadb:latest
container_name: db
restart: unless-stopped
env_file: .env
environment:
volumes:
- ./data/dbdata:/var/lib/mysql
nginx:
image: nginx:alpine
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/logs:/var/log/nginx/
- phpmyadmin:/var/www/html
phpmyadmin:
image: phpmyadmin/phpmyadmin:fpm-alpine
container_name: phpmyadmin
environment:
- PMA_HOST=db
restart: always
depends_on:
- db
volumes:
- phpmyadmin:/var/www/html
volumes:
phpmyadmin:
server {
listen 80;
listen [::]:80;
server_name pma.example.com;
location / {
rewrite ^ https://$host$request_uri? ;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name pma.example.com;
root /var/www/html;
index index.php index.html index.htm;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpmyadmin:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ /\.ht {
deny all;
}
location = /favicon.ico {
log_not_found off; access_log off;
}
location = /robots.txt {
log_not_found off; access_log off; allow all;
}
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
include conf.d/ssl-conf; # ssl stuff
}
It works perfectly fine. @williamdes
docker-compose.yml
phpmyadmin.conf
https://github.com/woosungchoi/docker-multi-site
Actually, I am using phpmyadmin as above, but I want to use fpm-alpine version to reduce the capacity. I am already using wordpress, gnuboard and rhymix in the same way. But not phpmyadmin.
https://github.com/phpmyadmin/docker/issues/253#issuecomment-543930024
I have already seen the comments in the link above. But it doesn't work.
How should I solve the problem?