Previous: MariaDB – Installation on Ubuntu Precise
1. Install phpMyAdmin.
- apt-get install phpmyadmin
2. Select neither Apache nor Lighttpd for the web server selection as we want to run it in Nginx.
3. And say NO for the Configure database for phpmyadmin with dbconfig-common?
4. Append the following settings in /etc/nginx/sites-available/default. Place it inside the server{}.
/etc/nginx/sites-available/default
location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; location ~ ^/phpmyadmin/(.+\.php)$ { try_files $uri =404; root /usr/share/; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; }
5. Restart the Nginx/
- /etc/init.d/nginx restart
6. Browse the following URL.
http://<your domain>/phpmyadmin
Done =)
Reference:
How i can run phpmyadmin on nginx with Apache (back-end)
(OS Debian 6 Squeeze)
LikeLike
Do you mean you are running nginx as reverse proxy in front of an apache?
LikeLike
Hi, My testing environment is Centos 6.4, Nginx 1.4.2, Php-fpm, Mysql. Now, your tutorial is a great starter for me 🙂 I have managed to pull up drupal installation with ease. but got stuck with phpmyadmin. I am getting following error message. here are my configuration nginx, pool & error http://pastebin.com/FnSMKkfS
php.ini http://pastebin.com/Vnbq2Jnc
can you please help where I am going wrong? Thanks
LikeLike
Probably your phpmyadmin folder is not located in /usr/share. Do you know the where it is installed on your linux?
LikeLike
I dont know i am afraid. I am very new linux environment. How can i find out?
LikeLike
in the shell, try
OR
What output u have?
LikeLike
locate command: no output
whereis command shows below
[root@localhost ~]# whereis phpmyadmin
phpmyadmin:
LikeLike
did you install the phpmyadmin and how?
LikeLike
yum install phpmyadmin
LikeLike
See if it is in /etc/phpMyAdmin.
If you still couldn’t find it. then i have no idea on where it is installed.
after you find the correct path, update the root /usr/share/; to the corresponding folder and restart the nginx.
LikeLike