【LEDE】树莓派上玩LEDE终极指南-71-安装phpMyAdmin

pma这东西,可有可无,navicat或者idea插件也都能相互替代,但是在某些环境下,从Web管理数据库显得尤为方便。

从https://www.phpmyadmin.net/下载pma,解压到mmc中。

nginx配置文件:

server {  
        listen 999;  #自行修改
        #server_name www.example.com;  
        #access_log logs/example.access.log main;  
  
        server_name_in_redirect off;  
  
        root /web/pma;  #按照需求修改
        index index.php index.html index.htm;  
  
	# WordPress single blog rules.
	# Designed to be included in any server {} block.
 
	# This order might seem weird - this is attempted to match last if rules below fail.
	# http://wiki.nginx.org/HttpCoreModule
	location / {
       		try_files $uri $uri/ /index.php?q=$uri&$args;
	}
 
	# Add trailing slash to */wp-admin requests.
	rewrite /wp-admin$ $scheme://$host$uri/ permanent;
 
	# Directives to send expires headers and turn off 404 error logging.
	#location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
       	#	access_log off; log_not_found off; expires max;
	#}
 
	# Uncomment one of the lines below for the appropriate caching plugin (if used).
	#include global/wordpress-wp-super-cache.conf;
	#include global/wordpress-w3-total-cache.conf;
 
	# Pass all .php files onto a php-fpm/php-fcgi server.
	location ~ \.php$ {
    		# Zero-day exploit defense.
   		# http://forum.nginx.org/read.php?2,88845,page=3
    		# Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.
    		# Comment the 'try_files' line out if you set up php-fpm/php-fcgi on another machine.  And then cross your fingers that you won't get hacked.
    		try_files $uri =404;
 
    		fastcgi_split_path_info ^(.+\.php)(/.+)$;
    		#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
 
    		include fastcgi_params;
    		fastcgi_index index.php;
    		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		#   fastcgi_intercept_errors on;
		fastcgi_pass 127.0.0.1:1027;#按照需求修改
	}

}  

reload nginx一下,就能打开pma了,没什么技术难度。


猜你喜欢

转载自blog.csdn.net/wang805447391/article/details/81061180