how to install adminer in debian with nginx - better than phpmyadmin

https://www.vultr.com/docs/install-adminer-on-debian-ubuntu

From Debian/Ubuntu repositories

This is an older version, 3.3.3-1.
sudo apt-get install adminer

From the Adminer project homepage

Newer versions are offered here, such as 4.2.1.
sudo mkdir /usr/share/adminer
sudo wget "http://www.adminer.org/latest.php" -O /usr/share/adminer/latest.php
sudo ln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php
echo "Alias /adminer.php /usr/share/adminer/adminer.php" | sudo tee /etc/apache2/conf-available/adminer.conf
sudo a2enconf adminer.conf

Once the installation completes, restart Apache.
sudo service apache2 restart 
At this point, the setup is complete. You can access Adminer at either of the following addresses.
http://[SERVER_IP]/adminer  

http://[SERVER_IP]/adminer.php
Replace [SERVER_IP] with the IP address of your VPS.
and the entry in nginx 
server {
        listen 80;
        server_name example.ro;
        root /usr/share/adminer;

        # If you want to use a .htpass file, uncomment the three following lines.
        auth_basic "Admin-Area! Password needed!";
        auth_basic_user_file /usr/share/adminer/.htpass;
        access_log /var/log/nginx/adminer-access.log;
        error_log /var/log/nginx/adminer-error.log;
        
location / {
                index index.php;
                try_files $uri $uri/ /index.php?$args;
        }

       location ~ .php$ {
             include fastcgi.conf;
             #fastcgi_pass localhost:9000;
             fastcgi_pass unix:/var/run/php5-fpm.sock;
             fastcgi_index index.php;
             fastcgi_param SCRIPT_FILENAME /usr/share/adminer$fastcgi_script_name;
        }
}
#AND TO ACCESS IT: HTT://EXAMPLE.RO/ADMINER

Comments