Question

I recently changed the url of my site from www.mydomain.com to mydomain.com (no subdomain) running off NGINX on Ubuntu. I had phpmyadmin working at www.mydomain.com/phpmyadmin (using this tutorial: https://www.digitalocean.com/community/articles/how-to-install-phpmyadmin-on-a-lemp-server/), but after changing the url I get a white page after signing in. Is there some phpmyadmin configuration file I need to change to reflect this url change?

Was it helpful?

Solution 2

Please take a look at /etc/nginx/site-available/default where you will need to add location /phpmyadmin

OTHER TIPS

this will change your /phpmyadmin to /otherfilename and work for LEMP Server (nginx)

  1. sudo apt update
  2. sudo apt install phpmyadmin
  3. sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
  4. check your url https://server_domain_or_IP/phpmyadmin
  5. update your vhost with

    location /phpmyadmin {
        root /usr/share/;
        index index.php;
    
        try_files $uri $uri/ =404;
        location ~ ^/phpmyadmin/(doc|sql|setup)/ {
            deny all;
        }
    
        location ~ /phpmyadmin/(.+\.php)$ {
            fastcgi_pass unix:/run/php/php7.2-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
            include snippets/fastcgi-php.conf;
        }
    }
    
  6. sudo service nginx restart

  7. check again your url to access to phpmyadmin
  8. cd /var/www/html/
  9. ls -l
  10. check phpmyadmin file
  11. create a symbolic file with

    sudo mv phpmyadmin otherfilename
    
  12. ls -l

  13. check your new symbolic file and change your virtual host in 5 point to

    location /otherfilename{
        root /var/www/html/;
        index index.php;
        try_files $uri $uri/ =404;
    
        location ~ ^/otherfilename/(doc|sql|setup)/ {
            deny all;
        }
    
        location ~ /otherfilename/(.+\.php)$ {
            fastcgi_pass unix:/run/php/php7.2-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
            include snippets/fastcgi-php.conf;
        }
    }
    
  14. sudo service nginx restart

  15. check your new url https://server_domain_or_IP/otherfilename
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top