How to configure adminer in nginx?

Help
Anonymous
2013-05-31
2013-08-13

  • Anonymous
    2013-05-31

    someone could help me to to configure adminer in nginx

    thanks :)

     
    • --/etc/nginx/sites-enabled/adminer--
      server {

      listen   80;
      server_name adminer;
      
      index adminer-3.3.3.php;
      set $root_path '/usr/share/adminer';
      root $root_path;
      

      try_files $uri $uri/ @rewrite;

      location @rewrite {
          rewrite ^/(.*)$ /index.php?_url=/$1;
      }
      
      location ~ \.php {
          fastcgi_pass unix:/run/php5-fpm.sock;
          fastcgi_index /adminer-3.3.3.php;
      
          include /etc/nginx/fastcgi_params;
      
          fastcgi_split_path_info       ^(.+\.php)(/.+)$;
          fastcgi_param PATH_INFO       $fastcgi_path_info;
          fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      }
      
      location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
          root $root_path;
      }
      
      location ~ /\.ht {
          deny all;
      }
      

      }
      ~
      --/etc/hosts--
      127.0.0.1 adminer

      nginx on rolling debian

       
      • Jakub Vrána
        Jakub Vrána
        2013-07-15

        You want to add this line:

        fastcgi_param REQUEST_URI $request_uri;

        Jakub

        --/etc/nginx/sites-enabled/adminer--
        server {

         listen   80;
         server_name adminer;
        
         index adminer-3.3.3.php;
         set $root_path '/usr/share/adminer';
         root $root_path;
        
        try_files $uri $uri/ @rewrite;
        
         location @rewrite {
             rewrite ^/(.*)$ /index.php?_url=/$1;
         }
        
         location ~ \.php {
             fastcgi_pass unix:/run/php5-fpm.sock;
             fastcgi_index /adminer-3.3.3.php;
        
             include /etc/nginx/fastcgi_params;
        
             fastcgi_split_path_info       ^(.+\.php)(/.+)$;
             fastcgi_param PATH_INFO       $fastcgi_path_info;
             fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         }
        
         location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
             root $root_path;
         }
        
         location ~ /\.ht {
             deny all;
         }
        

        }
        ~
        --/etc/hosts--
        127.0.0.1 adminer

        nginx on rolling debian


        How to configure adminer in nginx?


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/adminer/discussion/960418/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         
  • Jakub Vrána
    Jakub Vrána
    2013-06-01

    It should work without any configuration. Maybe you will need to set up some variables but that's same for all PHP scripts. What exactly doesn't work, is there some error message?

     
  • lan bird
    lan bird
    2013-08-13

    can someone post a proper raw code (here or in pastebay) , thanks a lot