Sorry about the link. Don't know how it happened.

So, the portions in question of nginx.conf are:



-----------------------------------------------------------------

        server {
         server_name     phpmyadmin.<domain.tld>;

         root    /usr/share/webapps/phpMyAdmin;
         index   index.php;

         location ~ \.php$ {
                 try_files      $uri =404;
                 fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
                 fastcgi_index  index.php;
                 include        fastcgi.conf;
         }
        }

        server {
         server_name     adminer.<domain.tld>;

         root    /usr/share/webapps/adminer;
         index   index.php;

         location ~ \.php$ {
                 try_files      $uri =404;
                 fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
                 fastcgi_index  index.php;
                 include        fastcgi.conf;
         }
        }

-----------------------------------------------------------------

And the  /etc/nginx/sites-available/adminer  file is:

        -----------------------------------------------------------------

    server {

     listen   80;
     server_name adminer;

     index adminer-3.3.3.php;
     set $root_path '/usr/share/webapps/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;
     }

    }
-----------------------------------------------------------------


I don't know if this file is necessary. The howtos for making Adminer/phpMyadmin work with Nginx are very limited to non-existent.


I want to be able to type http://ipaddress/phpmyadmin (or adminer) and see its respective interface. But as it is now, I only get 404 error.






On 02/06/14 20:43, B.R. wrote:
The right link for you nginx.conf is:
http://pastebin.com/uNTAwuTp
You could at least had that properly done...

Copy-pasting nginx configuration from somewhere else without
understanding it has little chances of success.

What have you tried to configure?
What do you expect from it (which directive does what)?

Please copy the /*relevant*/ parts of your configuration in your
messages here so further reference will be understandable.
---
*B. R.*


On Mon, Jun 2, 2014 at 8:16 PM, KC <[email protected]
<mailto:[email protected]>> wrote:

    I have been trying to set up Nginx with Adminer (and phpMyadmin),
    but I can't seem to get it to work.

    Here are my config files:

    /etc/nginx/nginx.conf:
    http://pastebin.com/uNTAwuTp*
    *
    /etc/nginx/sites-available/__adminer:
    http://pastebin.com/cpwK1Bz2


    But still if I go to http://server.ip/adminer

    I only get "404 Not Found" error.

    What am I doing wrong?

    _________________________________________________
    nginx mailing list
    [email protected] <mailto:[email protected]>
    http://mailman.nginx.org/__mailman/listinfo/nginx
    <http://mailman.nginx.org/mailman/listinfo/nginx>




_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to