Join the community today
Register Now

page not found when trying to access phpmyadmin

Discussion in 'Add Ons' started by moshbit, Jan 31, 2015.

Tags:
  1. moshbit

    moshbit Member

    53
    10
    8
    Jun 15, 2014
    Ratings:
    +13
    Local Time:
    10:42 PM
    1.15.0
    MariaDB 10.1.33
    so, after following the instructions at phpmyadmin.sh Centmin Mod Addon

    i seem to be stuck on the part where you access phpmyadmin via the url:


    https://squattheplanet.com/15791_mysqladmin11634

    i'm getting a page not found error from the xenforo install i have on the server. i know the instructions say to allow port 9418 in and out, and i believe i've done that (here's my "csf -l | grep 9418" output):

    Code:
    49       0     0 ACCEPT     tcp  --  !lo    *       0.0.0.0/0            0.0.0.0/0           ctstate NEW tcp dpt:9418
    21       1    60 ACCEPT     tcp  --  *      !lo     0.0.0.0/0            0.0.0.0/0           ctstate NEW tcp dpt:9418
    so i'm not sure if it's because i did something wrong or that i need to specifically set up something because of xenforo? (maybe a location / in my domains' conf?)

    the phpmyadmin script gave me this:

    Code:
    Password protected 15791_mysqladmin11634
    at path /usr/local/nginx/html/15791_mysqladmin11634
    config.inc.php at: /usr/local/nginx/html/15791_mysqladmin11634/config.inc.php
      WEB url:
    
      https://neptune/15791_mysqladmin11634
    
    Login with your MySQL root username / password
    ---------------------------------------------------------------
    
    phpmyadmin htaccess login details:
    Username: xxx
    Password: xxx
    Allowed IP address:
    
    ---------------------------------------------------------------
    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_15791_mysqladmin11634.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: 177.496988144 seconds
    phpmyadmin install log located at:
    /root/centminlogs/centminmod_phpmyadmin_install_310115-035043.log
    ---------------------------------------------------------------
    at which i notice that this looks weird:

    https://neptune/15791_mysqladmin11634

    not sure why i didn't get a complete url? also, i didn't get an ip in the "Allowed IP address:" field.

    this is my website's conf:

    Code:
    # HTTP Server
    server {
           listen             173.255.215.95:80;
               server_name           squattheplanet.com www.squattheplanet.com;
              return                301 https://squattheplanet.com$request_uri;
           }
    
    server {
         listen                173.255.215.95:443 ssl spdy;
           server_name           squattheplanet.com;
            keepalive_timeout       70;
    
            ssl_certificate         /usr/local/nginx/conf/ssl/squattheplanet.com/ssl-unified.crt;
            ssl_certificate_key     /usr/local/nginx/conf/ssl/squattheplanet.com/squattheplanet_com.key;
            ssl_trusted_certificate /usr/local/nginx/conf/ssl/squattheplanet.com/ssl-trusted.crt;
    
            ssl_protocols                   TLSv1 TLSv1.1 TLSv1.2;
            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:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:AES:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK;
            ssl_prefer_server_ciphers       on;
            add_header                      Alternate-Protocol 443:npn-spdy/3;
            add_header                      Strict-Transport-Security max-age=31536000;
            ssl_buffer_size                 4k;
            spdy_headers_comp               5;
            ssl_session_tickets             on;
            ssl_stapling                    on;
            ssl_stapling_verify             on;
            resolver                        [2001:1608:10:25::1c04:b12f] [2001:1608:10:25::9249:d69b] valid=10m;
            resolver_timeout                10s;
    
         access_log /home/nginx/domains/squattheplanet.com/log/access.log combined buffer=32k;
           error_log /home/nginx/domains/squattheplanet.com/log/error.log;
    
           root /home/nginx/domains/squattheplanet.com/public;
    
           location / {
                    try_files $uri $uri/ /index.php?$uri&$args;
                    location /internal_data {
                            location ~ \.(data|html|php)$ {
                                    internal;
                            }
                            internal;
                    }
                    location /library {
                            location ~ \.(default|html|php|txt|xml)$ {
                                    internal;
                            }
                            internal;
                    }
              location /data/taigachat/ {
                   open_file_cache off;
                   include /usr/local/nginx/conf/staticfiles.conf;
              }
            }
    
           include /usr/local/nginx/conf/staticfiles.conf;
           include /usr/local/nginx/conf/php.conf;
           include /usr/local/nginx/conf/drop.conf;
    }
    the only other thing i can think of to mention is that @Matt helped me set up the SSL/SPDY stuff so I'm not sure if I need to do anything special with that.

    so anyways, any help would be mucho appreciated :)
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    4:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    phpmyadmin addon uses the server's default hostname setup at step 1 of Getting Started Guide so if that isn't setup probably it can cause problems access phpmyadmin

    you can try accessing phpmyadmin installation via server ipaddress/15791_mysqladmin11634 to confirm if that is the case

    As per phpmyadmin.sh Centmin Mod Addon you only get static ip protection if before phpmyadmin install you set the script STATICIP='y'.
     
  3. moshbit

    moshbit Member

    53
    10
    8
    Jun 15, 2014
    Ratings:
    +13
    Local Time:
    10:42 PM
    1.15.0
    MariaDB 10.1.33
  4. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    4:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    accessing ip should usually go to hostname setup with Nginx vhost configuration file at /usr/local/nginx/conf/conf.d/virtual.conf (in step 1 of Getting Started with Centmin Mod so should get the default Nginx vhost index page at /usr/local/nginx/html where server_name is used for phpmyadmin installer and not direct to your forum site Nginx vhost /usr/local/nginx/conf/conf.d/yourdomain.com.conf and web root at /home/nginx/domains/yourdomain.com/public. So it's probably how @Matt has configured the your default hostname ?
     
    Last edited: Jan 31, 2015
  5. Matt

    Matt Well-Known Member

    932
    415
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +671
    Local Time:
    6:42 AM
    1.5.15
    MariaDB 10.2
    squattheplanet.conf is the only one with the IP address in.

    Just had a look now, and the phpmyadmin_ssl.conf file that is generated only listens on port 443 and for server name neptune. Virtual doesn't have an IP address in there either. I've always added the IP addresses to the config files since I started configuring nginx.
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    4:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    so hostname not set ? as phpmyadmin installer usually would use server's hostname for reference and that is usually tied to main IP of server. Guess neptune is the hostname of the server ? In that case it may work if @moshbit just sets up a local hosts file edit on his computer to point hostname neptune to his server's IP address and have associated one in server's /etc/hosts ? Or just setup a properly DNS setup hostname for virtual.conf tied to main server IP :)

    from phpmyadmin.sh Centmin Mod Addon

     
  7. karistuck

    karistuck Member

    43
    2
    8
    Jun 1, 2014
    대한민국
    Ratings:
    +3
    Local Time:
    3:42 PM
    1.5.8
    Hello, I also can't login to phpmyadmin with 403 error page on browser
     

    Attached Files:

    • 403.jpg
      403.jpg
      File size:
      29.5 KB
      Views:
      1
  8. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    4:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    same troubleshooting steps and questions I asked above apply :)
     
  9. karistuck

    karistuck Member

    43
    2
    8
    Jun 1, 2014
    대한민국
    Ratings:
    +3
    Local Time:
    3:42 PM
    1.5.8
    I fixed it thank you
     
  10. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    4:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    great what was the problem ?
     
  11. karistuck

    karistuck Member

    43
    2
    8
    Jun 1, 2014
    대한민국
    Ratings:
    +3
    Local Time:
    3:42 PM
    1.5.8
    I forget set up static ip address in config file.

    Thank you
     
    Last edited: Mar 24, 2015
  12. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    4:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I see :)
     
  13. elargento

    elargento Member

    352
    17
    18
    Jan 4, 2016
    Ratings:
    +44
    Local Time:
    3:42 AM
    10
    same issue here, 404 error. Hostname is fine and even in host file pointing to the server IP. I get the popup asking for user and password but then I get the 404 page

    edit: Don't need help anymore. I'm becoming an expert
     
    Last edited: Aug 16, 2017