Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access PhpMyAdmin within ssl-site #2439

Closed
rammi22 opened this issue Dec 22, 2019 · 2 comments
Closed

Cannot access PhpMyAdmin within ssl-site #2439

rammi22 opened this issue Dec 22, 2019 · 2 comments
Labels

Comments

@rammi22
Copy link

rammi22 commented Dec 22, 2019

Info:

  • Docker version: Docker version 19.03.5, build 633a0ea
  • Laradock commit: 67e9a51
  • System info: PC
  • System info disto/version: Win10

Issue:

I cannot access the phpMyAdmin if my application is runnig in ssl.
Error: PR_END_OF_FILE_ERROR

I'm following Setup for Multiple Projects
My folder structure:

  • laradock-tut
    -- laradock (contains the laradock)
    -- project-http (contains laravel 6)
    -- project-https (contains laravel 6)

calling the pages:
http http://docker-training.laradock-project-http.local
https http://docker-training.laradock-project-https.local
Both url's works fine

If i call the http-url (http://docker-training.laradock-project-http.local:8080) i have access to phpMyAdmin. But using the https-url (http://docker-training.laradock-project-https.local:4843), it response with the error.

I haven't found anything about the configuration in the docu...


Expected behavior:

Accessing phpMyAdmin from both url's


Reproduce:

calling the https-url http://docker-training.laradock-project-https.local:8080


Relevant Code:

laradock/ngingx/sites/project-http.config

server {

    listen 80;
    listen [::]:80;

    server_name docker-training.laradock-project-http.local;
    root /var/www/project_http/public;
    index index.php index.html index.htm;

    location / {
         try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_pass php-upstream;
        fastcgi_index index.php;
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        #fixes timeouts
        fastcgi_read_timeout 600;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }

    location /.well-known/acme-challenge/ {
        root /var/www/letsencrypt/;
        log_not_found off;
    }

    error_log /var/log/nginx/laravel_error.log;
    access_log /var/log/nginx/laravel_access.log;
}

laradock/ngingx/sites/project-https.config

server {

    listen 443 ssl;
    listen [::]:443 ssl ipv6only=on;
    ssl_certificate /etc/nginx/ssl/default.crt;
    ssl_certificate_key /etc/nginx/ssl/default.key;

    server_name docker-training.laradock-project-https.local;
    root /var/www/project_http/public;
    index index.php index.html index.htm;

    location / {
         try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        try_files $uri /index.php =404;
        fastcgi_pass php-upstream;
        fastcgi_index index.php;
        fastcgi_buffers 16 16k;
        fastcgi_buffer_size 32k;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        #fixes timeouts
        fastcgi_read_timeout 600;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }

    location /.well-known/acme-challenge/ {
        root /var/www/letsencrypt/;
        log_not_found off;
    }

    error_log /var/log/nginx/laravel_error.log;
    access_log /var/log/nginx/laravel_access.log;
}

phpmyadmin/Dockerfile

FROM phpmyadmin/phpmyadmin

LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"

# Add volume for sessions to allow session persistence
VOLUME /sessions

RUN echo '' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \
 && echo '[PHP]' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \
 && echo 'post_max_size = 2G' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \
 && echo 'upload_max_filesize = 2G' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini

# We expose phpMyAdmin on port 80
EXPOSE 80 443

docker-composer.yml

...
### phpMyAdmin ###########################################
    phpmyadmin:
      build: ./phpmyadmin
      environment:
        - PMA_ARBITRARY=1
        - MYSQL_USER=${PMA_USER}
        - MYSQL_PASSWORD=${PMA_PASSWORD}
        - MYSQL_ROOT_PASSWORD=${PMA_ROOT_PASSWORD}
      ports:
#        - "${PMA_PORT_HTTP}:80"
#        - "${PMA_PORT_HTTPS}:443"
        - "8080:80"
        - "4843:443"
      depends_on:
        - "${PMA_DB_ENGINE}"
      networks:
        - frontend
        - backend
...
@rammi22 rammi22 changed the title Cannot access PhpMyAdmin within sssl-site Cannot access PhpMyAdmin within ssl-site Dec 22, 2019
@stale
Copy link

stale bot commented Mar 21, 2020

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Mar 21, 2020
@stale
Copy link

stale bot commented Apr 11, 2020

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant