1

i can access www.***/phpmyadmin to login. if i log in with mysql user just hit blank page with no error. System runs on raspbian.

Installed : nginx 1.2.1 , php5.4.36

i tryed login from different browsers on different machines.i reset the cookies. url changed to phpmyadmin/index.php?token=****3a35b78052f67500a6bb2bd411e6

my nginx config :

    upstream php-handler {
    server 127.0.0.1:9000;
    #server unix:/var/run/php5-fpm.sock;
    }

    server {
    listen 80;
    server_name ***.net;
    return 301 https://$server_name$request_uri; # enforce https
    }

    server {
    listen 443 ssl;
    server_name ***.net;

    ssl_certificate /etc/nginx/cert.pem;
    ssl_certificate_key /etc/nginx/cert.key;

    ssl_ciphers "AES128+EECDH:AES128+EDH";
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;

    # Path to the root of your installation
    root /var/www/owncloud;

    client_max_body_size 1000M; # set max upload size
    fastcgi_buffers 64 4K;

    rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
    rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
    rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;

    index index.php
    error_page 403 /core/templates/403.php;
    error_page 404 /core/templates/404.php;

    location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
 }


# phpmyadmin
location /phpmyadmin {
alias   /usr/share/phpmyadmin;
index   index.php;
}

location ~ ^/phpmyadmin/libraries {
deny all;
}

location ~ ^/phpmyadmin/setup/lib {
deny all;
}

location ~ ^/phpmyadmin/setup/(.+\.php)$ {
auth_basic              "phpMyAdmin Setup";
auth_basic_user_file    "/etc/phpmyadmin/htpasswd.setup";
alias                   /usr/share/phpmyadmin/setup/$1;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass            php-handler;
fastcgi_index           index.php;
include                 fastcgi_params;
}

location ~ ^/phpmyadmin/(.+\.php)$ {
alias                   /usr/share/phpmyadmin/$1;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass            php-handler;
fastcgi_index           index.php;
include                 fastcgi_params;
}

location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
    deny all;
}


location ~ \.php(?:$|/) {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param HTTPS on;
    fastcgi_pass php-handler;
    fastcgi_index index.php;
}

# Optional: set long EXPIRES header on static assets
location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
# Optional: Don't log access to assets
access_log off;
}

}

I appreciate your help

migrated from serverfault.com Feb 20 '15 at 20:42

This question came from our site for system and network administrators.

  • Have you tried understand problem via logs? You would check nginx and php-fpm log. – Sergey Chizhik Feb 21 '15 at 12:54
  • i checked nginx and php-fpm logs. php-fpm logs are clr, but i get log – DAU Feb 22 '15 at 15:29
  • i get some errors in nginx. errors looks like : 2015/02/22 12:36:45 [error] 2106#0: 85 open() "/var/www/owncloud/phpmyadmin/themes/pmahomme/img/input_bg.gif" failed (2: No such file or directory). I assume he only finds the data in /phpmyadmin folder but not in /phpmyadmin/ subfolders. I dont understand why. The permissions are set for www-data user. – DAU Feb 22 '15 at 15:36
  • OK thats wired, i checked if i can access https://***/phpmyadmin/themes/pmahomme/img/logo_right.png for exampel and it worked. But if i look in the logs i got erros like : 2015/02/22 12:27:32 [error] 2102#0: *57 open() "/var/www/owncloud/phpmyadmin/themes/pmahomme/img/logo_right.png" failed (2: No such file or directory), client: 111.111.111.111, server: ***.net, request: "GET /phpmyadmin/them$ – DAU Feb 22 '15 at 20:19
3

I think I've just run into the same problem, though with Apache. If you view source on the page do you see the bulk of the html still but empty frames?

If so then the problem is most likely because of the following line in your nginx setup:

add_header X-Frame-Options DENY;

Setting this to SAMEORIGIN brought phpmyadmin back for me, this directive is preventing the page from being displayed in a frame in any context.

I couldn't find any errors in any of the logs tried.

  • You just made my day ;) – DAU Feb 25 '15 at 16:54
0

Looks like there is a file permission conflict, please set the same user to run at for nginx and php-fpm, most common "nginx" or "www-data". The config files are /etc/php-fpm.d/www.conf and /etc/nginx.conf. You can set the user and group for the hpMyadmin files with chown nginx:nginx /usr/share/phpmyadmin/* for example.

  • i checked the ownership of the files. i missed to configure it to www-data. i changed it for nginx, phpmyadmin and php-fpm but it had no impact. – DAU Feb 22 '15 at 13:38
  • Another error i made was, to set the wrong symbolic link to the Nginx installation. I used "sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html" "insted of sudo ln -s /usr/share/phpmyadmin /var/www/ownclouad; ". Surprisingly it loaded up the phpmyadmin login, but without the images and some graphics. After i changed that the login page is full corectly displayed, but still the error exist. – DAU Feb 22 '15 at 14:08
  • Please check your error log again. You should replace location /phpmyadmin { alias /usr/share/phpmyadmin; index index.php; } with location /phpmyadmin { root /usr/share ; } and remove the symlink. – Jannis Feb 22 '15 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.