Question

installing phpmyadmin to nginx centos server

Posted June 15, 2014 18.8k views
There isnt any tutorial about installing phpmyadmin to nginx on centos server. I googled it and I found here http://www.tecmint.com/install-phpmyadmin-for-apache-or-nginx-on-rhelcentos-6-3-5-8-fedora-17-12/ . The problem is there isnt any directory called "etc/nginx/sites-available" in my server. Can someone make a tutorial for that please? I really need phpmyadmin.
1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers
You can find your sites-avaiable directory in nginx.conf file. TIP: You can setup specifc por on server to respond for phpMyAdmin. Virtualhosts are awesome, take a look at http://wiki.nginx.org/ServerBlockExample
First, to get a LEMP stack on CentOS up and running, follow this article: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-6 Then install phpmyadmin with:
sudo yum --enablerepo=remi install phpmyadmin
Then edit /etc/nginx/conf.d/default.conf to include:
    location /phpmyadmin {
        alias /usr/share/phpMyAdmin/;
    }
Then finally, restart php and nginx:
service nginx restart
service php-fpm restart
Now, it will be available at http://your.ip.address/phpmyadmin
by Etel Sverdlov
LEMP stack is a group of open source software to get web servers up and running. The acronym stands for Linux, nginx (pronounced Engine x), MySQL, and PHP. This tutorial explains how to install the required repos to download nginx and php-fpm, how to install MySQL, how to install nginx, how to install php-fpm, how to configure php and nginx, and how to create a php info page. This tutorial is written for CentOS.
Submit an Answer