PhpMyAdmin is a widely used tool to manage databases on Linux and windows servers.
Sometimes you get the error ERR_SSL_PROTOCOL_ERROR when you try to access PhpMyAdmin. This usually happens when you use Apache and Nginx together as a reverse proxy. If you closely observe you can see that the URL is actually adding:80 to the end of the URL you are trying to access.
In my case here are the Nginx and apache conf
Apache config
<Directory /var/www/html/> Options +ExecCGI -Includes FCGIWrapper /var/www/php-bin/foodzilla/php .php </Directory> <VirtualHost 127.0.0.1:81 > ServerName test.iserversupport.com CustomLog /var/log/httpd/test.iserversupport.com.access.log combined DocumentRoot /var/www/html ServerAdmin webmaster@iss AssignUserId apache apache ServerAlias www.test.iserversupport.com AddHandler fcgid-script .php </VirtualHost>
Nginx Conf
server { server_name server8.iserversupport.com www.server8.iserversupport.com; set $root_path /var/www/html/; location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ { expires 7d; root $root_path; error_page 404 = @fallback; } location / { proxy_pass http://127.0.0.1:81; proxy_redirect http://127.0.0.1:81/ /; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; } location @fallback { proxy_pass http://127.0.0.1:81; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/server8.iserversupport.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/server8.iserversupport.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = server8.iserversupport.com) { return 301 https://$host$request_uri; } # managed by Certbot server_name server8.iserversupport.com www.server8.iserversupport.com; listen 80; return 404; # managed by Certbot }
Steps to fix PhpMyAdmin ERR_SSL_PROTOCOL_ERROR with Apache and Nginx
Open the file config.default.php usually the location of the file is /usr/share/phpMyAdmin/libraries/config.default.php if you installed using yum.
Open the file and replace the below entry
/** * whether to force using HTTPS * * @global boolean $cfg['ForceSSL'] */ $cfg['ForceSSL'] = false;
Change it to
/** * whether to force using HTTPS * * @global boolean $cfg['ForceSSL'] */ $cfg['ForceSSL'] = true;
Just save the file and try to log in to PhpMyAdmin.
So these are the troubleshooting steps to resolve PhpMyAdmin ERR_SSL_PROTOCOL_ERROR with Apache and Nginx. At Iserversupport, we have experienced and dedicated server administrators who manage your server effectively to reduce downtime and enhance performance. We are specialized in Linux Server Management, Windows server management, cPanel Server Management, Outsourced Web Hosting support, and Cloud Infrastructure Management.
Leave A Comment