Concerning phpMyAdmin : do you install it on all web server or just one ?

Discussion in 'Installation/Configuration' started by ledufakademy, Aug 30, 2020.

  1. ledufakademy

    ledufakademy Member

    thank you for you helps. but it's really hard , here.
     
  2. ledufakademy

    ledufakademy Member

    rahhhhhhhhhhhhhhhhhhhh :
    thinnk successful login .... BU :

    ERROR 404 - Not Found!
    The following error occurred:
    The requested URL was not found on this server.

    Please check the URL or contact the webmaster.

    note : the url is like that : https://db3.domain.com/index.php
     
    Last edited: Sep 2, 2020
  3. ledufakademy

    ledufakademy Member

    Weirddness ... if i click on back button of browser ... phpmyadmin appear with my user connected , what that ?

    (is it nomral that we can see: information_schema database ?)
     
  4. ledufakademy

    ledufakademy Member

  5. ledufakademy

    ledufakademy Member

    or perhaps something wrong here ?

    location /phpmyadmin {
    root /usr/share/;
    index index.php index.html index.htm;
    location ~ ^/phpmyadmin/(.+\.php)$ {
    try_files $uri =404;
    root /usr/share/;
    fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
    fastcgi_param HTTPS on; # <-- add this line
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $request_filename;
    include /etc/nginx/fastcgi_params;
    fastcgi_param PATH_INFO $fastcgi_script_name;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 256 4k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    }
    location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
    root /usr/share/;
    }
    }
    location /phpMyAdmin {
    rewrite ^/* /phpmyadmin last;
    }​
     
  6. ledufakademy

    ledufakademy Member

    the config file is strange too :

    $i++;
    /* Authentication type */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    /* Server parameters */
    $cfg['Servers'][$i]['host'] = 'dbx.domain.com';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['AllowNoPassword'] = false;

    /**
    * phpMyAdmin configuration storage settings.
    */

    /* User used to manipulate with storage */
    $cfg['Servers'][$i]['controlhost'] = 'localhost';
    $cfg['Servers'][$i]['controlport'] = '';
    $cfg['Servers'][$i]['controluser'] = 'pma';
    $cfg['Servers'][$i]['controlpass'] = 'phpmyadminpassword';
     
  7. ledufakademy

    ledufakademy Member

  8. ledufakademy

    ledufakademy Member

    i think there is an issue in ispconfig redir ...
    Because when auth success i got :
    ERROR 404 - Not Found!

    and if i use back button of breiwser sometimes it show me the phpmyadmin panel ...
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Unlikely, I use it for years now without a single issue, and it has not been changed in years. So it's definitely something with your customized config.
     
  10. ledufakademy

    ledufakademy Member

    if i try to put bad password i got this :
    mysqli_real_connect(): (HY000/1045): Access denied for user 'c2_user1'@'web.domain.com' (using password: YES)
    but no error 404
     
  11. ledufakademy

    ledufakademy Member

    hello Till,
    thank you for answering.
    Yes but with multi server server ?

    and after ERROR 404
    if manually modify the url :
    https://db3.domain.com/phpmyadmin/index.php?server=2
    (instead of : https://db3.domain.com/index.php?server=2)
    the phpmyadmin panel is showing up.

    this is an issue of URL rewriting with nginx ...
     
    Last edited: Sep 3, 2020
  12. ledufakademy

    ledufakademy Member

    i'm not sure you use it with one web server (web1) and a database server (db1)
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. And it does not matter here if it's a multiserver or not. The URL that is used is the one that you entered in the phpmyadmin URL field, so it's totally up to you which URL is used for the redirect. You can even enter https://google.com there, and you'll get redirected to google ;)
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    This does not matter as well, the chars that you enter as URL for the redirect get used for the redirect. So it's all up to you and what you have set as redirect URL.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    And if you use the optional [SERVERNAME] placeholder, then this gets replaced by the server name of the database server.
     
  16. ledufakademy

    ledufakademy Member

    i'm using this builtin redirection : https://[SERVERNAME]/phpmyadmin
    can you give me the task in order to activate phpmyadmin in webgui of ispconfig ? (i follow your howto for install it)
    and if i want let's encrypt on db1.domain.com/phpmyadmin ... i need to create a site , named db1.domain.com which is the database server name ...
    i don't see how i can to another way ....
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, this means that you installed phpmyadmin in the URL /phpmyadmin/ on your db server and ISPConfig makes the correct redirect. If you have not installed phpmyadmin in that URL on the db server, then you must get a 404 of course and apparently, you missed installing it in the right place if you claim that https://db3.domain.com/index.php?server=2 URL works. So you installed phpmyadmin not in its own folder, you installed it in the web root, which means you must use this URL of course:

    https://[SERVERNAME]/

    It's described in any ISPConfig perfect server guide how to install phpmyadmin.
     
  18. ledufakademy

    ledufakademy Member

    oups : so i must install nginx on db server too ? (if you said : install phpmyadmin on db server ...)
     
  19. ledufakademy

    ledufakademy Member

    hummmmm !!

    db3.domain.com is a cname of web3.domain .com !!!
    (this is the same public ip BUT, in /usr/share/phpmyadmin/config.inc.php i'm using LOCAL IP address of db3.domain.com server.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    You know how your systems are named and you can see what gets replaced as [SERVERNAME] in the redirect, so you must know where to install what on your systems and you claimed above that the server name part was correct and matched the install of your phpmyadmin installation URL except of the /phpmyadmin/ in the URL.
     

Share This Page