phpmyadmin link in ispconfig nginx not found

Discussion in 'Installation/Configuration' started by DantePasquale, Feb 27, 2017.

  1. DantePasquale

    DantePasquale Member HowtoForge Supporter

    Hi,
    I've been hacking my way from Apache to nginx on a test server and have things basically working.
    However, phpmyadmin seems to be lost ;(
    When clicking the link from the Database Link I get a 505 with the following in the nginx error.log:


    2017/02/27 10:17:02 [error] 7582#7582: *5803 directory index of "/var/www/apps/" is forbidden, client: 5.2.74.126, server: _, request: "GET / HTTP/1.1", host: "99.78.112.49:8081"
    2017/02/27 14:35:13 [error] 7580#7580: *6091 open() "/usr/local/ispconfig/interface/web/phpmyadmin" failed (2: No such file or directory), client: 192.168.1.66, server: _, request: "GET /phpmyadmin HTTP/1.1", host: "inferno.cocoanet.us:8080", referrer: "https://inferno.cocoanet.us:8080/index.php"

    I'm not sure what I missed but there is no phpmyadmin in the directory above:

    ls -l /usr/local/ispconfig/interface/web
    total 124
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 admin
    -rwxr-x--- 1 ispconfig ispconfig 3188 Feb 22 22:43 capp.php
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 client
    -rwxr-x--- 1 ispconfig ispconfig 2970 Feb 22 22:43 content.php
    drwxr-x--- 7 ispconfig ispconfig 4096 Feb 22 22:43 dashboard
    -rwxr-x--- 1 ispconfig ispconfig 1901 Feb 22 22:43 datalogstatus.php
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 dns
    -rwxr-x--- 1 ispconfig ispconfig 0 Feb 22 22:43 dummy_login.html
    -rwxr-x--- 1 ispconfig ispconfig 18478 Feb 22 22:43 favicon.ico
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 help
    -rwxr-x--- 1 ispconfig ispconfig 4521 Feb 22 22:43 index.php
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 js
    -rwxr-x--- 1 ispconfig ispconfig 1649 Feb 22 22:43 keepalive.php
    drwxr-x--- 4 ispconfig ispconfig 4096 Feb 22 22:43 login
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 mail
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 mailuser
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 monitor
    -rwxr-x--- 1 ispconfig ispconfig 5144 Feb 22 22:43 nav.php
    drwxr-x--- 2 ispconfig ispconfig 4096 Feb 22 22:43 remote
    -rwxr-x--- 1 ispconfig ispconfig 25 Feb 22 22:43 robots.txt
    drwxr-x--- 7 ispconfig ispconfig 4096 Feb 22 22:43 sites
    drwxr-x--- 3 ispconfig ispconfig 4096 Feb 22 22:43 strengthmeter
    drwxrwx--- 2 ispconfig ispconfig 4096 Feb 22 22:43 temp
    drwxr-x--- 3 ispconfig ispconfig 4096 Feb 22 22:43 themes
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 tools
    drwxr-x--- 6 ispconfig ispconfig 4096 Feb 22 22:43 vm
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Have you added phpmyadmin in ISPC vhost file? If not, you must add it first in server block. Something like this:
    Code:
            location /phpmyadmin{
                    root /usr/share/;
                    index index.php index.html index.htm;
                    location ~ ^/phpmyadmin/(.+\.php)$ {
                            try_files $uri =404;
                            root /usr/share/;
                            # include /etc/nginx/fastcgi_params;
                            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                            fastcgi_param HTTPS $fastcgi_https; # <-- add this line fastcgi_paramHTTPS on;
                            fastcgi_index index.php;
                            fastcgi_param SCRIPT_FILENAME $request_filename;
                            include /etc/nginx/fastcgi_params;
                            fastcgi_param PATH_INFO $fastcgi_script_name;
                            fastcgi_buffer_size 128k;
                            fastcgi_buffers 256 4k;
                            fastcgi_busy_buffers_size 256k;
                            fastcgi_temp_file_write_size 256k;
                            fastcgi_intercept_errors on;
                    }
                    location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                            root /usr/share/;
                    }
            }
    
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    It is not lost, phpmyadmin on nginx is on port 8081, so the URL to phpmyadmin is:

    http://yourserver.tld:8081/phpmyadmin/

    the same applies to webmail. You can set that URL in ISPConfig under System > Interface config.

    What @ahrasis suggested works as well, it is an alternative solution described in the setup guide to access phpmyadmin directly trough a website on port 80.
     
  4. DantePasquale

    DantePasquale Member HowtoForge Supporter

    Thanks TIll and @ahrasis -- very helpful information and it does work!
    Now, if AT&T would fix there stuff I might be able to get all my websites back online :(
     
  5. Ark74

    Ark74 Member

    Hi!, I know this is a really old thread but I wanted to share this.
    I just noticed that phpmyadmin will run on $port+1, so if you use the default 8080 then phpmyadmin will run on 8081, if you use 1111, then phpmyadmin will run on 1112.
    Interesting, right? ;)
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Only in nginx and only if you do not want to use it with its own website.
     
  7. Ark74

    Ark74 Member

    Indeed
     

Share This Page