Discover Centmin Mod today
Register Now

Install phpmyadmin.sh issue and general question

Discussion in 'Add Ons' started by EvilGenius, Sep 14, 2017.

  1. EvilGenius

    EvilGenius New Member

    6
    1
    3
    Sep 14, 2017
    Ratings:
    +3
    Local Time:
    3:48 AM
    MariaDB 10
    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.08stable
    • Nginx Version Installed: 1.11.10
    • PHP Version Installed: 7.1.0
    • MariaDB MySQL Version Installed: 10.0.21
    • When was last time updated Centmin Mod code base ? : 2 days ago after i installed centmin mod
    • Persistent Config: no
    Hello,

    What i wanna ask is the following in step 1 of the start guide where you set hostname i kinda can't understand what exactly am i supposed to put.

    So my domain name is mangamaid.com my VPS is on linode.com so i used for hostname maid.mangamaid.com cause in the example we have hostname.domain.com so i though this should be fitting as if i haven't understand wrong hostname is just a name you give? I might have understood wrong of course hence my question here.

    In the etc/hosts file i have put the following line

    ServerIP maid.mangamaid.com maid

    Example was: IP hostname.domainname.com hostname

    I decided to first set the server before installing Xenforo so i installed phpmyadmin with the phpmyadmin.sh and it gave me the following


    Code (Text):
    ---------------------------------------------------------------
    Create update script:
    /root/tools/phpmyadmin_update.sh
    ---------------------------------------------------------------
    ---------------------------------------------------------------
    Create uninstall script:
    /root/tools/phpmyadmin_uninstall.sh
    ---------------------------------------------------------------
    
    ---------------------------------------------------------------
    Password protected 26123_mysqladmin24109
    at path /usr/local/nginx/html/26123_mysqladmin24109
    config.inc.php at: /usr/local/nginx/html/26123_mysqladmin24109/config.inc.php
      WEB url:
    
      https://maid.mangamaid.com/26123_mysqladmin24109
    
    Login with your MySQL root username / password
    ---------------------------------------------------------------
    
    phpmyadmin htaccess login details:
    Username: Username
    Password: PW
    Allowed IP address: MyIpAdress
    
    ---------------------------------------------------------------
    phpmyadmin update script at: /root/tools/phpmyadmin_update.sh
    Add your own cron job to automatically run the update script i.e.
    
      15 01 * * * /root/tools/phpmyadmin_update.sh
    
    ---------------------------------------------------------------
    phpmyadmin uninstall script at: /root/tools/phpmyadmin_uninstall.sh
    
      /root/tools/phpmyadmin_uninstall.sh
    
    ---------------------------------------------------------------
    SSL vhost: /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf
    php-fpm includes: /usr/local/nginx/conf/php_26123_mysqladmin24109.conf
    php-fpm pool conf: /usr/local/nginx/conf/phpfpmd/phpfpm_myadmin.conf
    dedicated php-fpm pool user: phpmyadmin
    dedicated php-fpm pool group: nginx
    dedicated php error log: /var/log/php_myadmin_error.log
    ---------------------------------------------------------------
    SSL vhost access log: /var/log/nginx/localhost_ssl.access.log
    SSL vhost error log: /var/log/nginx/localhost_ssl.error.log
    ---------------------------------------------------------------
    
    ---------------------------------------------------------------
    Total phpmyadmin Install Time: 44.063835725 seconds
    phpmyadmin install log located at:
    /root/centminlogs/centminmod_phpmyadmin_install_130917-184215.log
    



    But then when i try to go on https://maid.mangamaid.com/26123_mysqladmin24109 it can't reach the site, but when i try with ipadress/26123_mysqladmin24109/ with IP address it reaches

    So my question is how do i need to set my host settings so it can be reached with mangamaid.com/..../ or how is it supposed to be setup because mangamaid.com is going to be my Xenforo Forum address too.

    Also when i login in ipadress/26123_mysqladmin24109/ with the given name and pw from the installation i get error 502 bad gateway.


    Thanks for the help beforehand also i checked the phpmyadmin log for the 502 error, but there is nothing in it.

    @eva2000 As advised i made the thread public one hope i made it in the right forum though feel free to change the place if needed. Thanks.
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,719
    6,711
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,015
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    Getting Started Guide Step 1 outlines the very first thing to do after centmin mod install is to setup working main hostname on server which includes adding the main hostname's DNS A record in your case maid.managamaid.com DNS A record pointing to server IP address

    IIRC it's something that was fixed in 123.09beta01 but not in 123.08stable for phpmyadmin.sh installer. Double check in /usr/local/etc/php-fpm.conf that this line is uncommented without semi colon in front
    Code (Text):
    include=/usr/local/nginx/conf/phpfpmd/*.conf
    

    if has semi-colon in front, remove it and restart nginx and php-fpm
    Code (Text):
    nprestart
    

    For 123.08stable when you run php upgrades via centmin.sh menu option 5 and if it prompts to replace php-fpm.conf, answer no instead. As replacing php-fpm disables and comments out the include=/usr/local/nginx/conf/phpfpmd/*.conf line again disable phpmyadmin's php config which resides in /usr/local/nginx/conf/phpfpmd/. While this was fixed in 123.09beta01 hence why 123.09beta01 has more fixes and improvements and is highly recommended.
     
  3. EvilGenius

    EvilGenius New Member

    6
    1
    3
    Sep 14, 2017
    Ratings:
    +3
    Local Time:
    3:48 AM
    MariaDB 10
    Hello, so i decided to just do a little reinstall of my server and go with

    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.11.10 (Not sure if this is what the 123.09beta01 installs by default)
    • PHP Version Installed: 7.1.0
    • MariaDB MySQL Version Installed: 10.1.26
    • When was last time updated Centmin Mod code base ? : 3h ago
    • Persistent Config: no
    I have added DNS A Record with value being the server IP. I did wait ~1-2h giving it time to run through.

    [​IMG]

    But now i am getting the following issues:

    I get "The site can't be reached" with the link given to me when i installed phpmyadmin.sh neither can i reach it if i change it to the ip address.

    This is how my php-fpm.conf looks like currently:

    Code (Text):
    [global]
    ; Log level
    ; Possible Values: alert, error, warning, notice, debug
    ; Default Value: notice
    log_level = warning
    pid = /var/run/php-fpm/php-fpm.pid
    error_log = /var/log/php-fpm/www-error.log
    emergency_restart_threshold = 10
    emergency_restart_interval = 1m
    process_control_timeout = 10s
    include=/usr/local/nginx/conf/phpfpmd/*.conf
    
    [www]
    user = nginx
    group = nginx
    
    listen = 127.0.0.1:9000
    listen.allowed_clients = 127.0.0.1
    ;listen.backlog = -1
    
    ;listen = /tmp/php5-fpm.sock
    listen.owner = nginx
    listen.group = nginx
    listen.mode = 0660
    
    pm = ondemand
    pm.max_children = 16
    ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
    pm.start_servers = 8
    pm.min_spare_servers = 4
    pm.max_spare_servers = 12
    pm.max_requests = 1000
    
    ; PHP 5.3.9 setting
    ; The number of seconds after which an idle process will be killed.
    ; Note: Used only when pm is set to 'ondemand'
    ; Default Value: 10s
    pm.process_idle_timeout = 10s;
    
    rlimit_files = 65536
    rlimit_core = 0
    
    ; The timeout for serving a single request after which the worker process will
    ; be killed. This option should be used when the 'max_execution_time' ini option
    ; does not stop script execution for some reason. A value of '0' means 'off'.
    ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
    ; Default Value: 0
    ;request_terminate_timeout = 0
    ; Default Value: 0
    ;request_slowlog_timeout = 0
    slowlog = /var/log/php-fpm/www-slow.log
    
    pm.status_path = /phpstatus
    ping.path = /phpping
    ping.response = pong
    
    ; Limits the extensions of the main script FPM will allow to parse. This can
    ; prevent configuration mistakes on the web server side. You should only limit
    ; FPM to .php extensions to prevent malicious users to use other extensions to
    ; exectute php code.
    ; Note: set an empty value to allow all extensions.
    ; Default Value: .php
    security.limit_extensions = .php .php3 .php4 .php5
    
    ; catch_workers_output = yes
    php_admin_value[error_log] = /var/log/php-fpm/www-php.error.log
    php_admin_value[disable_functions] = shell_exec



    This is my phpmyadmin_https.conf

    Code (Text):
    location ^~ /MySqlAdminLocation/ {
    <------>#try_files $uri $uri/ /MySqlAdminLocation/index.php?$args;
    <------>include /usr/local/nginx/conf/MySqlAdmin.conf;
    
    <------>auth_basic      "Private Access";
    <------>auth_basic_user_file  /usr/local/nginx/conf/htpassphpmyadmin;
    <------>allow 127.0.0.1;
    <------>allow MyIpAdress;
    <------>#deny all;
    }
     
  4. eva2000

    eva2000 Administrator Staff Member

    29,719
    6,711
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,015
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  5. EvilGenius

    EvilGenius New Member

    6
    1
    3
    Sep 14, 2017
    Ratings:
    +3
    Local Time:
    3:48 AM
    MariaDB 10
  6. EvilGenius

    EvilGenius New Member

    6
    1
    3
    Sep 14, 2017
    Ratings:
    +3
    Local Time:
    3:48 AM
    MariaDB 10
    Hello, just wanna tell how i fixed my issue for future people who have that issue.

    Since i had bought domain from namecheap.com and my VPS was in linode.com i had to just add linodes nameservers

    ns1.linode.com
    ns2.linode.com
    ns3.linode.com
    ns4.linode.com
    ns5.linode.com

    In namecheap.com and then just make a DNS record with mangamaid.com in Linode in their DNS manager they make a default A record and all and all worked

    Still thanks for the help.
     
    • Informative Informative x 1
  7. eva2000

    eva2000 Administrator Staff Member

    29,719
    6,711
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,015
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    thanks for the update/info :)