0
点赞
收藏
分享

微信扫一扫

安装phpmyadmin

kiliwalk 2022-05-03 阅读 79
apt update
apt upgrade -y
apt install -y phpmyadmin

需要安装php7.2

nginx配置文件/etc/nginx/conf.d/phpmyadmin.conf

server {
  listen 8081;
  listen [::]:8081;
  server_name pma.example.com;
  root /usr/share/phpmyadmin/;
  index index.php index.html index.htm index.nginx-debian.html;

  access_log /var/log/nginx/phpmyadmin_access.log;
  error_log /var/log/nginx/phpmyadmin_error.log;

  location / {
    try_files $uri $uri/ /index.php;
  }

  location ~ ^/(doc|sql|setup)/ {
    deny all;
  }

  location ~ \.php$ {
    fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    include snippets/fastcgi-php.conf;
  }

  location ~ /\.ht {
    deny all;
  }
}
举报

相关推荐

0 条评论