Welcome to Centmin Mod Community
Become a Member

phpmyadmin.sh Addon

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

  1. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what did you change ssl address to ? where did you make the change ? remember to restart nginx and php-fpm and maybe clear browser cache

     
  2. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    3:05 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    I did not change ssl adress for phpmyadmin at all nor I was did anything with phpmyadmin files. I am referring on change my forum to ssl address.
    I think that old self created ssl certificate (when creating virtual host) or some default one created during installation of phpmyadmin was overridden or replaced with new one when I 2 nights ago installed payed ssl certificate on my page (went from http to https).
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    no that wouldn't of happened as phpmyadmin installer's ssl vhost is separate at /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf with self-signed ssl at
    Code:
    ssl_certificate      /usr/local/nginx/conf/ssl/${SSLHNAME}.crt;
    ssl_certificate_key  /usr/local/nginx/conf/ssl/${SSLHNAME}.key;
    where ${SSLHNAME} is your server's hostname
     
  4. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    3:05 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Code:
    # https SSL SPDY phpmyadmin
    server {
            listen 443 ssl http2;
                server_name tvor-ocean.pijanitvor.com;
                root   html;
    
    keepalive_timeout  3000;
    
    client_body_buffer_size 256k;
    client_body_timeout 3000s;
    client_header_buffer_size 256k;
    ## how long a connection has to complete sending
    ## it's headers for request to be processed
    client_header_timeout  60s;
    client_max_body_size 512m;
    connection_pool_size  512;
    directio  512m;
    ignore_invalid_headers on;
    large_client_header_buffers 8 256k;
    
            ssl_certificate      /usr/local/nginx/conf/ssl/tvor-ocean.pijanitvor.com.crt;
            ssl_certificate_key  /usr/local/nginx/conf/ssl/tvor-ocean.pijanitvor.com.key;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            ssl_session_cache      shared:SSL:10m;
            ssl_session_timeout  10m;
            # mozilla recommended
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
            ssl_prefer_server_ciphers   on;
            ##add_header Alternate-Protocol  443:npn-spdy/3;
            #add_header Strict-Transport-Security "max-age=0; includeSubdomains;";
            add_header X-Frame-Options SAMEORIGIN;
            ###spdy_headers_comp 5;
            ssl_buffer_size 1400;
            ssl_session_tickets on;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
            access_log              /var/log/nginx/localhost_ssl.access.log     main buffer=32k;
            error_log               /var/log/nginx/localhost_ssl.error.log      error;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
        location / {
            return 302 http://$server_name$request_uri;
        }
     
      include /usr/local/nginx/conf/phpmyadmin_https.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      #include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      include /usr/local/nginx/conf/errorpage.conf;
    }
    

    /usr/local/nginx/conf/ssl/

    [​IMG]


    /usr/local/nginx/conf/ssl/pijanitvor.com/

    [​IMG]
     
  5. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    3:05 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    any thoughts @eva2000
    maybe to reinstall phpmyadmin?
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what's contents of /usr/local/nginx/conf/phpmyadmin_https.conf file ?

    you can try uninstall and reinstall via uninstall file at /root/tools/phpmyadmin_uninstall.sh
     
  7. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    3:05 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Code:
    location ^~ /10984_mysqladmin29243/ {
        #try_files $uri $uri/ /10984_mysqladmin29243/index.php?$args;
        include /usr/local/nginx/conf/php_10984_mysqladmin29243.conf;
    
        auth_basic      "Private Access";
        auth_basic_user_file  /usr/local/nginx/conf/htpassphpmyadmin;
        #allow 127.0.0.1;
        #allow 93.137.109.82;
        #deny all;
    }
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    should work then.. so try uninstall + reinstall
     
  9. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    3:05 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Working good after reinstall.
    Have to chage bookmark to new address and change pass and username to something easy to remember for me
     
  10. SneakyDave

    SneakyDave Member

    84
    14
    8
    Jul 24, 2014
    Ratings:
    +22
    Local Time:
    8:05 PM
    1.0.15
    I used to use this quite frequently, but since upgrading to PHP 5.5, I needed to install this again, as the previous version I had only worked with PHP < 5.5.

    I followed the instructions on this page to get the latest script,

    Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS

    After I did the "phpmyadmin.sh install", I got the mysqladmin directory created in /usr/local/nginx/html/, and when I browse that URL, I get an authentication popup asking me for the user (root) and password (which I know works because I can connect to the database through the mysql command line), but it keeps telling me that the authentication isn't correct.

    Any ideas how to track down this problem? I don't normally use PhpMyAdmin anymore, but I find it useful to quickly create a user with a database and all privileges to it. Is there a faster way?


    Never mind, looking at the password file, I realize that you don't use the database "root" userid.
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah a normal nginx user http authentication user/pass is used first to protect the phpmyadmin install directory first :)
     
  12. SneakyDave

    SneakyDave Member

    84
    14
    8
    Jul 24, 2014
    Ratings:
    +22
    Local Time:
    8:05 PM
    1.0.15
    To tell you the truth, that's a pretty fast, easy, and secure method of providing web based database access. Probably the best that I've seen. You've got an obscure URL behind SSL with a not easily guessed userid and password, plus you need the database user and password after that.
     
  13. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yup as outlined at Addon phpmyadmin.sh - CentminMod.com LEMP Nginx web stack for CentOS I value my data security especially for databases, so value and care that Centmin Mod user's data is also secure :D
     
  14. speedway

    speedway Member

    48
    13
    8
    Nov 28, 2015
    Sydney, AUSTRALIA
    Ratings:
    +18
    Local Time:
    1:05 PM
    1.19.2
    Dont' Know Right Now
    About to instal this baby and am wondering how to handle a dynamic ip from my ISP. Would it be better to rem out the specific IP and rely on the major password entry only?
     
  15. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    by default, ip restriction is disabled so dynamic ips should be fine
     
  16. speedway

    speedway Member

    48
    13
    8
    Nov 28, 2015
    Sydney, AUSTRALIA
    Ratings:
    +18
    Local Time:
    1:05 PM
    1.19.2
    Dont' Know Right Now
    Cool ta, installing now
     
  17. pamamolf

    pamamolf Premium Member Premium Member

    4,074
    427
    83
    May 31, 2014
    Ratings:
    +833
    Local Time:
    4:05 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Code:
    https://server.domain.com/288_mysqladmin26605/

    This webpage has a redirect loop

    ERR_TOO_MANY_REDIRECTS

    I install it and i try to connect with my hostname and my /etc/hosts has an entry about my hostname and i have an A record for it....

    Any ideas?
     
  18. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    A few things to try
    • If you upgraded PHP after you installed phpmyadmin addon, try clearing browser cache and restarting nginx and php-fpm
    • Check nginx error and access log - FAQ item 19 and Config Files page for overview.
    • Ensure you have a valid DNS for the main hostname pointing to your server's IP address
    • Ensure main hostname is setup as per step 1 of Getting Started Guide where main hostname is not the same as a site's nginx vhost domain name. They have to be different as outlined in the difference and summary of Getting Started Guide.
      This allows the main hostname vhost to house all the PHP and nginx statistic pages and phpmyadmin urls.
    • So ensure the server_name listed in main hostname vhost at /usr/local/nginx/conf/conf.d/virtual.conf isn't referenced in other nginx domain vhost files.
    Post contents of these files wrapped in BBCODE CODE tags
    • /usr/local/nginx/conf/conf.d/virtual.conf
    • /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf
    • /usr/local/nginx/conf/phpmyadmin.conf
     
    Last edited: Jan 27, 2016
  19. pamamolf

    pamamolf Premium Member Premium Member

    4,074
    427
    83
    May 31, 2014
    Ratings:
    +833
    Local Time:
    4:05 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    virtual.conf:

    Code:
    server {
    #         listen   80;
                listen   80 default_server backlog=2048 reuseport;
                server_name server.domain.com;
                root   html;
    
            access_log              /var/log/nginx/localhost.access.log     main buffer=256k flush=5m;
            error_log               /var/log/nginx/localhost.error.log      error;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
    # limit_conn limit_per_ip 16;
    # ssi  on;
    
            location /nginx_status {
            stub_status on;
            access_log   off;
            allow 127.0.0.1;
            #allow youripaddress;
            deny all;
            }
    
                location / {
    
    # block common exploits, sql injections etc
    #include /usr/local/nginx/conf/block.conf;
    
    #         Enables directory listings when index file not found
    #        autoindex  on;
    
    #        Shows file listing times as local time
    #        autoindex_localtime on;
    
    #        Enable for vBulletin usage WITHOUT vbSEO installed
    #        try_files        $uri $uri/ /index.php;
               
                }
    
            # example nginx-http-concat
            # /csstest/??one.css,two.css
            #location /csstest {
            #concat on;
            #concat_max_files 20;
            #}
    
    include /usr/local/nginx/conf/phpmyadmin.conf;
    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/php.conf;
    #include /usr/local/nginx/conf/phpstatus.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    include /usr/local/nginx/conf/vts_mainserver.conf;
    
           }
    phpmyadmin_ssl.conf:
    Code:
    # https SSL SPDY phpmyadmin
    server {
            listen 443 ssl http2;
                server_name server.domain.com;
                root   html;
    
    keepalive_timeout  3000;
    
    client_body_buffer_size 256k;
    client_body_timeout 3000s;
    client_header_buffer_size 256k;
    ## how long a connection has to complete sending
    ## it's headers for request to be processed
    client_header_timeout  60s;
    client_max_body_size 512m;
    connection_pool_size  512;
    directio  512m;
    ignore_invalid_headers on;
    large_client_header_buffers 8 256k;
    
            ssl_certificate      /usr/local/nginx/conf/ssl/server.domain.com.crt;
            ssl_certificate_key  /usr/local/nginx/conf/ssl/server.domain.com.key;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            ssl_session_cache      shared:SSL:10m;
            ssl_session_timeout  10m;
            # mozilla recommended
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!CAMELLIA;
            ssl_prefer_server_ciphers   on;
            add_header Alternate-Protocol  443:npn-spdy/3;
            #add_header Strict-Transport-Security "max-age=0; includeSubdomains;";
            add_header X-Frame-Options SAMEORIGIN;
            #spdy_headers_comp 5;
            ssl_buffer_size 1400;
            ssl_session_tickets on;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
            access_log              /var/log/nginx/localhost_ssl.access.log     main buffer=32k;
            error_log               /var/log/nginx/localhost_ssl.error.log      error;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
        location / {
            return 302 http://$server_name$request_uri;
        }
       
      include /usr/local/nginx/conf/phpmyadmin_https.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      #include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      include /usr/local/nginx/conf/errorpage.conf;
    }
    /usr/local/nginx/conf/phpmyadmin_https.conf <---Doesn't exist

    ssl.conf:

    Code:
    # HTTPS server
    #
    #server {
    #    listen       443;
    #    server_name  localhost;
    #    keepalive_timeout  30;
    
    #    ssl                  on;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;
    #    ssl_session_timeout  5m;
    
        #openssl <1.0.1
        #ssl_protocols SSLv3 TLSv1;
        #openssl >=1.0.1
        #ssl_protocols SSLv3 TLSv1.1 TLSv1.2;
    
    ##
    #    ssl_session_cache    shared:SSL:10m;
    #    ssl_session_timeout  10m;
    ## http://www.openssl.org/docs/apps/ciphers.html
    #    ssl_ciphers  RC4:HIGH:!aNULL:!MD5:!kEDH;
    #    ssl_prefer_server_ciphers   on;
    
    #    location / {
    #        root   html;
    #    }
    
    #include /usr/local/nginx/conf/staticfiles.conf;
    #include /usr/local/nginx/conf/php.conf;
    #include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    #include /usr/local/nginx/conf/vts_server.conf;
    
    #}
     
  20. eva2000

    eva2000 Administrator Staff Member

    54,098
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    12:05 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    looks okay to me, try testing in cleared browser private incognito session accessing the phpmyadmin install directory and try restart nginx and php-fpm services