Want to subscribe to topics you're interested in?
Become a Member

phpmyadmin.sh Addon

Discussion in 'Add Ons' started by eva2000, May 25, 2014.

  1. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    FYI when phpmyadmin.sh runs it sets up self-signed SSL cert based HTTPS on main hostname too so it would conflict if you tried to setup ssl on main hostname too.

     
  2. Mastergumble

    Mastergumble Member

    44
    8
    8
    Sep 29, 2016
    Ratings:
    +17
    Local Time:
    12:06 AM
    1.11.x
    10.x
    George I installed centmin with phpmyadmin.sh as the developers for the webshop requested it...

    This webshop is going to a new baremetal server in company but the existing one (company.com) is still outside so we have the DNS pointing to that host.

    I asked them to add two DNS entries webserver.company.com for the new webshop with laravel project set, and a server.company.com the server hostname, internally we placed a redirection on the firewall to port 5556 for http and 5557 to https, I can get the laravel test page using webshop.company.com:5556 without a problem and the server.company.com:5556 shows centmin test page correctly.

    Now the issue is getting into phpmyadmin, with the host file edit it works without any problem, but need somehow a way so they can reach it outside like server.mycompany:5557/12345_mysqladmin1234

    Any ideas?
     
  3. inthecloudblog

    inthecloudblog Active Member

    199
    36
    28
    Jan 26, 2016
    Ratings:
    +83
    Local Time:
    9:06 PM
    1.4.6
    Hi George . I've read that PHPMA script it's still on beta. What does it need ?

    Regards
     
  4. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    can't those other folks add host file edit too ?

    It can be used just over time is has run up against issues due to end user configuration of main hostname.
     
  5. inthecloudblog

    inthecloudblog Active Member

    199
    36
    28
    Jan 26, 2016
    Ratings:
    +83
    Local Time:
    9:06 PM
    1.4.6
    The single thing a friend of mine asks me help him with is : to have access ( via an app he made) to a hosted db he wants to access via pma.
    In case I follow the guidelines this way it should be secure for me to have the db online?
    I will be making use of let's encrypt, put a vpn server inside the box and only allow the server ip ( plus some other vpns of my own) to reach the modified url of pma and make use of keys with passphrase.
    Should that suffice to think would be secure?
    I'm telling him to encrypt the db maybe with bcrypt.
     
  6. Kintaro

    Kintaro Member

    104
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    1:06 AM
    1.15.x
    MariaDB 10
    I installed phpmyadmin following instructions here:
    Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS

    I noticed that some public directories and file get own by "phpmyadmin" user and "nginx" group. is it normal? In particular, directory migrated from another server with rsync.

    Code:
    [02:01][root@sub.domain.com domain.com]# ls -lhrt public
    totale 152K
    -rw-r-----.  1 nginx      nginx 1,7K  9 feb  2016 README.md
    -rw-r-----.  1 nginx      nginx  636  9 feb  2016 package.json
    -rw-r-----.  1 nginx      nginx 1,1K  9 feb  2016 LICENSE
    -rw-r-----.  1 nginx      nginx 2,2K  9 feb  2016 Gruntfile.js
    -rw-r-----.  1 nginx      nginx  35K 10 gen  2018 index.html
    drwxrwxr-x. 14 phpmyadmin nginx 4,0K 13 gen  2018 invoices
    -rw-r-----.  1 nginx      nginx 6,5K 15 ott 17.45 index_centmin.html
    -rw-r-----.  1 nginx      nginx 2,0K 15 ott 17.45 401.html
    -rw-r-----.  1 nginx      nginx 2,0K 15 ott 17.45 403.html
    -rw-r-----.  1 nginx      nginx 1,9K 15 ott 17.45 404.html
    -rw-r-----.  1 nginx      nginx 2,0K 15 ott 17.45 502.html
    -rw-r-----.  1 nginx      nginx 2,0K 15 ott 17.45 500.html
    -rw-r-----.  1 nginx      nginx 7,6K 15 ott 17.45 503.jpg
    -rw-r-----.  1 nginx      nginx 2,0K 15 ott 17.45 503.html
    -rw-r-----.  1 nginx      nginx 2,0K 15 ott 17.45 504.html
    -rw-r-----.  1 nginx      nginx 2,0K 15 ott 17.45 50x.html
    -rw-r-----.  1 nginx      nginx 2,1K 15 ott 17.45 maintenance.html
    drwxr-s---.  6 nginx      nginx 4,0K 15 ott 17.57 font-awesome
    drwxr-s---.  2 nginx      nginx 4,0K 15 ott 18.00 css
    drwxr-s---.  2 nginx      nginx 4,0K 15 ott 18.00 fonts
    drwxr-s---.  6 nginx      nginx 4,0K 15 ott 18.00 img
    drwxr-s---.  2 nginx      nginx 4,0K 15 ott 18.00 js
    drwxr-s---.  2 nginx      nginx 4,0K 15 ott 18.00 less
    drwxr-s---.  2 nginx      nginx 4,0K 15 ott 18.00 mail
    drwxr-s---.  4 nginx      nginx 4,0K 15 ott 22.51 stripe
    drwxr-s---.  5 nginx      nginx 4,0K 15 ott 22.52 ebay
    drwxr-xr-x.  6 phpmyadmin nginx 4,0K 16 ott 02.01 invoiceplane
    Code:
    [02:01][root@sub.domain.com domain.com]# ls -lhrt public/invoiceplane/
    totale 272K
    drwxr-xr-x. 16 phpmyadmin nginx 4,0K  3 giu  2017 application
    drwxr-xr-x.  5 phpmyadmin nginx 4,0K  3 giu  2017 assets
    drwxr-xr-x.  6 phpmyadmin nginx 4,0K  3 giu  2017 uploads
    drwxr-xr-x. 14 phpmyadmin nginx 4,0K  3 giu  2017 vendor
    -rw-r--r--.  1 phpmyadmin nginx 2,7K  3 set  2017 DEVELOPMENT.md
    -rw-r--r--.  1 phpmyadmin nginx 1,6K 16 ott 00.25 ipconfig.php
    -rw-r--r--.  1 phpmyadmin nginx 5,9K 16 ott 01.25 Gruntfile.js
    -rw-r--r--.  1 phpmyadmin nginx  90K 16 ott 01.25 composer.lock
    -rwxr-xr-x.  1 phpmyadmin nginx  11K 16 ott 01.25 index.php
    -rw-r--r--.  1 phpmyadmin nginx 1,5K 16 ott 01.25 ipconfig.php.example
    -rw-r--r--.  1 phpmyadmin nginx  724 16 ott 01.25 Dockerfile
    -rw-r--r--.  1 phpmyadmin nginx  640 16 ott 01.25 htaccess
    -rwxr-xr-x.  1 phpmyadmin nginx 3,0K 16 ott 01.25 README.md
    -rw-r--r--.  1 phpmyadmin nginx  90K 16 ott 01.25 package-lock.json
    -rw-r--r--.  1 phpmyadmin nginx 1,2K 16 ott 01.25 package.json
    -rw-r--r--.  1 phpmyadmin nginx 7,1K 16 ott 01.25 CONTRIBUTING.md
    -rw-r--r--.  1 phpmyadmin nginx   25 16 ott 01.26 robots.txt
    -rwxr-xr-x.  1 phpmyadmin nginx 5,0K 16 ott 01.26 LICENSE.txt
    -rw-r--r--.  1 phpmyadmin nginx  634 16 ott 01.26 composer.json
     
  7. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    yes that is normal phpmyadmin.sh does this specifically for phpmyadmin auto installation itself. But not normal if directories not related to phpmyadmin install directory to be owned as such
     
  8. Kintaro

    Kintaro Member

    104
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    1:06 AM
    1.15.x
    MariaDB 10
    Can be a bug?

    Now I'm going to chown nginx:nginx those directory, now
     
  9. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    were those directories rsync'd from another server ? could be due to that ? you could run history command and filter on chown commands to review your past runs of chown to see if you did accidentally do a chown you didn't intend

    look at command history grep filter on keyword chown and show matches in context of 3 lines before and after the match
    Code (Text):
    history | grep -C3 chown
    
     
  10. Kintaro

    Kintaro Member

    104
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    1:06 AM
    1.15.x
    MariaDB 10
    I think I understood... can be possible that rsynced file/dirs inherit owner:group ids... and then the new server recognize them as a different user:group?
     
  11. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    probably best to backtrack in history commands and see if there's an clues.
     
  12. Kintaro

    Kintaro Member

    104
    11
    18
    Dec 2, 2016
    Italy
    Ratings:
    +30
    Local Time:
    1:06 AM
    1.15.x
    MariaDB 10
    no chown command presents in the history... I think happened this:
    phpmyadmin.sh Addon is it impossibile?
     
  13. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    if you want to test the theory out you can repeat your rsync transfer commands on a separate test destination directory and see if that test destination directories resulting files end up with same inherited user/group ownership
     
  14. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    phpmyadmin 4.8.4 security release is out. phpmyadmin.sh installed versions will have a cronjob auto updating script to update your phpmyadmin installs. You will need to check if the version has been updated to 4.8.4. Details at Security - phpmyadmin 4.8.4 security update release
     
  15. pamamolf

    pamamolf Well-Known Member

    4,028
    421
    83
    May 31, 2014
    Ratings:
    +817
    Local Time:
    2:06 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    502 bad gateway

    It was ok and after x days maybe related to php updates? it was not working....

    I uninstall and reinstall it but again it doesn't work...

    The only change that i did was to update to the latest version of php 7.2.x and to enable the systemd for php....
     
    Last edited: Mar 13, 2019
  16. pamamolf

    pamamolf Well-Known Member

    4,028
    421
    83
    May 31, 2014
    Ratings:
    +817
    Local Time:
    2:06 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Yes it was related to systemd script for php and when i revert it, phpmyadmin was ok !
    (i got also some upgrade issues on my forum that all gone after reverting it)

    So something needs a fix at Phpmyadmin script ....
     
    Last edited: Mar 13, 2019
  17. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    Indeed I suspect that is the case too. Will look into it.
     
  18. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    updated phpmyadmin.sh with fix switching from unix socket to TCP for that php-fpm pool too so uninstall via
    Code (Text):
    /root/tools/phpmyadmin_uninstall.sh

    and redownload latest phpmyadmin.sh version as per Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS and run install again

    phpmyadmin.sh-130319-01.png
     
  19. pamamolf

    pamamolf Well-Known Member

    4,028
    421
    83
    May 31, 2014
    Ratings:
    +817
    Local Time:
    2:06 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    So with your fix it will work on both now?

    Initd or systemd ?
     
  20. eva2000

    eva2000 Administrator Staff Member

    50,926
    11,807
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,265
    Local Time:
    10:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    yup i basically switched phpmyadmin back from unix socket to tcp listener :)