How to install phpmyadmin on nginx, web server .. in Ubuntu 16.04.

Step :
1) sudo apt-get instal phpmyadmin
2) have two choice, apache / lighthttpd.. select none with click ‘tab’ on your keyboard – then enter.

config : dbconfig-common, select no.

3) sudo gedit /etc/nginx/sites-available/default, copy this script in server{ ..copy here.. }

====
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
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;
}
==

4) restart nginx, sudo service nginx restart
5) open

if you getting a error, like this :
502 Bad Gateway.
nginx/1.10.0 (Ubuntu)

you must install php-fpm, with :
sudo apt-get install php5.6-fpm

where 5.6 is your php version.

6) restart again nginx, sudo service nginx restart

7) bingo!

===========
See this video for details.

Nguồn: https://codeigniterbrasil.com

Xem thêm bài viết khác: https://codeigniterbrasil.com/lap-trinh-php/

28 Comments

Rahmat Aulia

April 23, 2020

paten kali, how to combine phpmyadmin with codeigniter to config in nginx?

Reply

Иван Андреевич

April 23, 2020

mysqli_real_connect(): (HY000/2002): No such file or directory

Reply

yash pandey

April 23, 2020

what is the default login password

Reply

Mano b

April 23, 2020

thanks , helped to configure in my cloud server subscribed from www.datasoft.ws

Reply

Jb Pido

April 23, 2020

Does this work on apache2?

Reply

ViShAl UpArE

April 23, 2020

Thanks Bro… You saved me from worries regarding phpmyadmin

Reply

Rahul Gaikwad

April 23, 2020

Thanks man, You just save my day.

Reply

Rustam Sariyev

April 23, 2020

Thanks bro good job

Reply

Charles Campista

April 23, 2020

Thanks, the comments on the description help a lot.

Reply

CpanelBuzz

April 23, 2020

Thanks Brother Worked!!!

Reply

Никита Землянухин

April 23, 2020

thanks

Reply

Maurício Eugênio

April 23, 2020

Nice!

Reply

Steve Obongo

April 23, 2020

That was good

Reply

Bùi Thế Đô

April 23, 2020

Thank you so much!

Reply

tweedie

April 23, 2020

i lost 2 days, but u help.
tnx

Reply

Omar Elghandour

April 23, 2020

thank you its work

Reply

Максим Епихин

April 23, 2020

Thanks!!!

Reply

Jeyhun M

April 23, 2020

Thank you very much Ambar!

Reply

Kelvin Kibugi

April 23, 2020

Thank you man. Worked Perfectly.

Reply

AlgoBlog

April 23, 2020

THANK YOU!

Reply

Mark James

April 23, 2020

Nice job. Easy to follow and worked like a charm.

Thank you.

Reply

Raaz Kumar Com

April 23, 2020

worked thanks can you explain rewriting in nginx

Reply

Marvin Skapar

April 23, 2020

Thanks.. it's work on me…

keep sharing… 🙂

Reply

Marvin Skapar

April 23, 2020

Nice Clip….

Reply

soldier soldier

April 23, 2020

You saved me, man!

Reply

Hossein Bajan

April 23, 2020

Thanks!

Reply

bigot-x

April 23, 2020

4:49 am… my friend, you saved me 🙂

Reply

Web Atom

April 23, 2020

I am so gratefull I found this video!!!!!!! Thank you!!! Took me ages to figure out this and could have taken maybe two more ages if I didn't find this! Thank you!!! Awesome help!

Reply

Leave a Reply