You are not logged in.

#1 2013-10-06 19:18:46

ytsejam
Member
Registered: 2012-02-10
Posts: 56

Nginx phpmyadmin does not work

Hello ,
I am following the arch wiki phpmyadmin. I can make nginx work but still no chance to make phpmyadmin work . I get 404 error with the settings below

my /etc/hosts as here :

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1       localhost.localdomain   localhost
127.0.0.1       izmirtaki.dev           localhost ytsejam
127.0.0.1       phpmyadmin.<domain.tld>

::1             localhost.localdomain   localhost

# End of file

/etc/nginx/nginx.conf has the setting for phpmyadmin

 
worker_processes  2;
 
events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    include /etc/nginx/sites-enabled/*;
 

    sendfile        on;
  
 
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;
        include /etc/nginx/php.conf;
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /usr/share/nginx/html;
            index  index.html index.htm index.php;
        }
        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
     server {
         server_name     phpmyadmin.<domain.tld>;

         root    /usr/share/webapps/phpMyAdmin;
         index  index.html index.htm index.php;
         #index   index.php;

         location ~ \.php$ {
                 try_files      $uri =404;
                 fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
                 #fastcgi_param  PHP_ADMIN_VALUE  open_basedir="/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/";
                 #fastcgi_param  PHP_ADMIN_VALUE  open_basedir="/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/";
                 fastcgi_param SCRIPT_FILENAME /usr/share/webapps/phpMyAdmin$fastcgi_script_name;
                 fastcgi_index  index.php;
                 include        /etc/nginx/fastcgi.conf;
         }
         location ~ /\.ht {
           deny  all;
        }

    }
}

Can you help me to fix it ?

Offline

Board footer

Powered by FluxBB