Discover Centmin Mod today
Register Now

phpMyAdmin addon 403 error

Discussion in 'Add Ons' started by Manhhailua, Jul 23, 2016.

  1. Manhhailua

    Manhhailua Member

    39
    2
    8
    Jul 7, 2016
    Hanoi
    Ratings:
    +5
    Local Time:
    8:35 PM
    1.11.1
    10.0.x
    I have successfully installed phpMyAdmin addon to my centmin VPS. But, I cannot access its url. Result page is always 403 although I strictly followed this guide.

    My "/usr/local/nginx/conf/phpmyadmin_https.conf":
    Code:
    location ^~ /29045_mysqladmin28978/ {
            #try_files $uri $uri/ /29045_mysqladmin28978/index.php?$args;
            include /usr/local/nginx/conf/php_29045_mysqladmin28978.conf;
    
            auth_basic    "Private Access";
            auth_basic_user_file  /usr/local/nginx/conf/htpassphpmyadmin;
            #allow 127.0.0.1;
            #allow ;
            #deny all;
    }

     
  2. eva2000

    eva2000 Administrator Staff Member

    29,044
    6,590
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,785
    Local Time:
    11:35 PM
    Nginx 1.13.x
    MariaDB 5.5
    just to confirm if you remove password protection by commenting out with hash # in front these 2 lines and restart nginx and php-fpm does access work ?
    Code (Text):
            #auth_basic    "Private Access";
            #auth_basic_user_file  /usr/local/nginx/conf/htpassphpmyadmin;

    uncomment the lines after testing to re-enable password protection
     
  3. Manhhailua

    Manhhailua Member

    39
    2
    8
    Jul 7, 2016
    Hanoi
    Ratings:
    +5
    Local Time:
    8:35 PM
    1.11.1
    10.0.x
    Code:
    #auth_basic    "Private Access";
    #auth_basic_user_file  /usr/local/nginx/conf/htpassphpmyadmin;
    Unfortunately, it did not work!
    My VPS hostname is always default "corejs-tracking-test-2.novalocal" after rebooting. (I think I cannot change my hostname permanently.)
    I manually set hostname to "srv1.manhhailua.com"
    Code:
    $ hostnamectl set-hostname srv1.manhhailua.com
    Then I install/reinstall phpMyAdmin.sh but I get stuck in 403 problem.
    Do you need any information else, eva?
     
  4. eva2000

    eva2000 Administrator Staff Member

    29,044
    6,590
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,785
    Local Time:
    11:35 PM
    Nginx 1.13.x
    MariaDB 5.5
  5. Manhhailua

    Manhhailua Member

    39
    2
    8
    Jul 7, 2016
    Hanoi
    Ratings:
    +5
    Local Time:
    8:35 PM
    1.11.1
    10.0.x
  6. Sunka

    Sunka Active Member

    888
    230
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +376
    Local Time:
    3:35 PM
    Nginx 1.13.3
    MariaDB 10.1.24
    Try this url (http or htpps)
    Code:
    http://YOUR DONAME IP/29045_mysqladmin28978
    OR
    httpS://YOUR DONAME IP/29045_mysqladmin28978
     
  7. Manhhailua

    Manhhailua Member

    39
    2
    8
    Jul 7, 2016
    Hanoi
    Ratings:
    +5
    Local Time:
    8:35 PM
    1.11.1
    10.0.x
    I tried this way before posting this thread and it did not work! I'm now digging in the nginx config of phpMyAdmin addon after installation.
     
  8. Manhhailua

    Manhhailua Member

    39
    2
    8
    Jul 7, 2016
    Hanoi
    Ratings:
    +5
    Local Time:
    8:35 PM
    1.11.1
    10.0.x
    My problem is still occurring. I've successfully change hostname to eg. "abc.maindomain.com". phpMyAdmin addon page still returns 403.

    Here is the log from "/var/log/nginx/localhost.error.log":
    Code:
    2016/07/26 03:57:53 [error] 3467#0: *9 open() "/usr/local/nginx/html/21487_mysqladmin30068.gz" failed (13: Permission denied), client: 113.190.232.10, server: corejs-tracking-test-2, request: "GET /21487_mysqladmin30068 HTTP/1.1", host: "srv1.manhhailua.com"
    2016/07/26 03:57:53 [error] 3467#0: *9 open() "/usr/local/nginx/html/21487_mysqladmin30068" failed (13: Permission denied), client: 113.190.232.10, server: corejs-tracking-test-2, request: "GET /21487_mysqladmin30068 HTTP/1.1", host: "srv1.manhhailua.com"
    2016/07/26 03:57:53 [error] 3467#0: *9 open() "/usr/local/nginx/html/favicon.ico.gz" failed (13: Permission denied), client: 113.190.232.10, server: corejs-tracking-test-2, request: "GET /favicon.ico HTTP/1.1", host: "srv1.manhhailua.com", referrer: "http://srv1.manhhailua.com/21487_mysqladmin30068"
    2016/07/26 03:57:53 [error] 3467#0: *9 open() "/usr/local/nginx/html/favicon.ico" failed (13: Permission denied), client: 113.190.232.10, server: corejs-tracking-test-2, request: "GET /favicon.ico HTTP/1.1", host: "srv1.manhhailua.com", referrer: "http://srv1.manhhailua.com/21487_mysqladmin30068"
     
  9. eva2000

    eva2000 Administrator Staff Member

    29,044
    6,590
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,785
    Local Time:
    11:35 PM
    Nginx 1.13.x
    MariaDB 5.5
    Might need to enable nginx debug mode and check the debug logs.

    Latest update on September 14, 2015 to Centmin Mod 1.2.3-eva2000.08 stable (123.08stable) and higher has added Nginx debug mode support. Nginx debug mode is disabled by default.

    To enable, edit centmin.sh and change variable NGINX_DEBUG=n default to NGINX_DEBUG=y and recompile Nginx via centmin.sh menu option 4 and then setting error_log in nginx vhosts to debug as outlined at nginx.org/en/docs/debugging_log.html & wiki.nginx.org/Debugging.

    You do not want to leave Nginx debug mode running forever, so after debugging, set NGINX_DEBUG=n in centmin.sh and recompile Nginx again via centmin.sh menu option 4 and remove error_log debugging mode to disable Nginx debug mode again.

    To update your Centmin Mod builds code for Nginx debug mode support if you do not have a NGINX_DEBUG variable in centmin.sh, follow instructions at centminmod.com/upgrade.html and respective version threads below:

    Centmin Mod is provided as is, but you can try debugging mode for Nginx for further troubleshooting if you have problems with Nginx (i.e. segfaults / signal 11 issues) as outlined at nginx.org/en/docs/debugging_log.html & wiki.nginx.org/Debugging.
     
    • Informative Informative x 1