Home > Database > phpMyAdmin > body text

nginx server supports phpmyadmin configuration

王林
Release: 2019-12-11 15:52:15
Original
6009 people have browsed it

nginx server supports phpmyadmin configuration

1. First download and decompress phpmyadmin

After the download is complete, decompress:

unzip phpMyAdmin-4.1.12-all-languages.zip
Copy after login

Move to the corresponding directory location and change into an easily accessible name:

mv phpMyAdmin-4.1.12-all-languages /www/phpmyadmin
Copy after login

2. Then configure phpmyadmin

Copy a configuration file:

#cd /www/phpmyadmin
#cp config.sample.inc.php config.inc.php
Copy after login

Configuration config.inc.php

#vi config.inc.php
Copy after login

Set a secret key for internal use (related to internal encryption, not directly related to page login)

$cfg['blowfish_secret'] = ‘www.tudaxia.com';
Copy after login

3. Configure the site under Nginx

vi /etc/nginx/conf.d/phpmyadmin.conf
Copy after login
server {
 listen 8081;
 server_name localhost;
 access_log /var/log/nginx/phpmyadmin-access.log main;

 location / {
  root /www/phpmyadmin;
  index index.php;
 }

 location ~ \.php$ {
  root /www/phpmyadmin;
  fastcgi_pass  unix:/var/run/php-fpm/php-fpm.sock;
  fastcgi_index index.php;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;  include fastcgi_params;
 }

 location ~ /\.ht {
  deny all;
 }
}
Copy after login

4. Restart nginx

#service nginx restart
Copy after login

Configuration completed.

Recommended related article tutorials: phpmyadmin tutorial

The above is the detailed content of nginx server supports phpmyadmin configuration. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template