phpmyadmin nginx设置
1,解压缩phpmyadmin4.2.8压缩包到/usr/local/phpMyAdmin
2,复制config.sample.inc.php为config.inc.php
3,修改nginx.conf 里
加入 include /usr/local/nginx/conf.d/*.conf; 这段,
- http {
- include mime.types;
- default_type application/octet-stream;
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- access_log logs/access.log main;
- sendfile on;
- #tcp_nopush on;
- #keepalive_timeout ;
- keepalive_timeout ;
- gzip on;
- include /usr/local/nginx/conf.d/*.conf;
新建conf.d文件夹
新建phpmyadmin.conf如下
- server {
- listen ;
- server_name localhost;
- access_log /usr/local/nginx/phpmyadmin-access.log main;
- location / {
- root /usr/local/phpMyAdmin;
- index index.php;
- }
- location ~ \.php$ {
- root /usr/local/phpMyAdmin;
- fastcgi_pass 127.0.0.1:;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~ /\.ht {
- deny all;
- }
- }
4,config.inc.php修改为:
- * This is needed for cookie based authentication to encrypt password in
- * cookie
- */
- $cfg['blowfish_secret'] = '123456'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
- /*
- * Servers configuration
- */
- $i = 0;
- /*
- * First server
- */
- $i++;
- /* Authentication type */
- $cfg['Servers'][$i]['auth_type'] = 'config';
- /* Server parameters */
- $cfg['Servers'][$i]['host'] = '127.0.0.1';
- $cfg['Servers'][$i]['connect_type'] = 'tcp';
- $cfg['Servers'][$i]['compress'] = false;
- $cfg['Servers'][$i]['AllowNoPassword'] = true;
- /*
- * phpMyAdmin configuration storage settings.
- */
- /* User used to manipulate with storage */
- // $cfg['Servers'][$i]['controlhost'] = '';
- // $cfg['Servers'][$i]['controlport'] = '';
- $cfg['Servers'][$i]['controluser'] = 'root';
- $cfg['Servers'][$i]['controlpass'] = '';
- /* Storage database and tables */
- // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
- // $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
- // $cfg['Servers'][$i]['relation'] = 'pma__relation';
- // $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
- // $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
- // $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
- // $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
- // $cfg['Servers'][$i]['history'] = 'pma__history';
- // $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
- // $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
- // $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
- // $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
- // $cfg['Servers'][$i]['recent'] = 'pma__recent';
- // $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
- $cfg['Servers'][$i]['users'] = 'root';
- $cfg['Servers'][$i]['password'] = '';
- // $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
- // $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
- // $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
- /* Contrib / Swekey authentication */
- // $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
phpmyadmin nginx设置的更多相关文章
- Nginx设置alias别名目录访问phpmyadmin
引言:Nginx服务器通过设置alias别名可以使特定的目录(phpmyadmin目录)不出现在网站根目录下面,即使网站根目录被攻破,也不会影响到phpmyadmin目录里面的文件. 说明: 站点:h ...
- Nginx设置alias实现虚拟目录 alias与root的用法区别
Nginx 貌似没有虚拟目录的说法,因为它本来就是完完全全根据目录来设计并工作的.如果非要给nginx安上一个虚拟目录的说法,那就只有alias标签比较"像",干脆来说说alias ...
- Nginx设置线程数为整机内核数的俩倍!
Nginx设置线程数为整机内核数的俩倍!
- nginx设置不使用缓存 add_header Cache-Control no-cache
nginx设置不使用缓存 server { listen 443; #域名 server_name www.dev.163.com; #字符集 charset utf-8; ssl on; ssl_c ...
- nginx设置SSL反向代理
Nginx的反向代理通常用来映射内网中提供的Apache.IIS.Lighttpd服务,以实现负载均衡:同时,由于动态服务程序运行在内网,服务器的整体安全性也有所提高,那么怎样用nginx设置SSL的 ...
- nginx 设置进程title
刚好看到nginx设置进程title的源码,因此做一些总结. linux进程实际是以argv[0]处的值来作为进程的title的,因此若需要修改进程的title只需要修改argv[0]处的值即可. 简 ...
- Nginx设置Https反向代理,指向Docker Gitlab11.3.9 Https服务
目录 目录 1.GitLab11.3.9的安装 2.域名在阿里云托管,申请免费的1年证书 3.Gitlab 的 https 配置 4.Nginx 配置 https,反向代理指向 Gitlab 配置 目 ...
- Nginx设置网站维护页面
网站升级需要停服,可以在Nginx设置静态页面设置强制跳转 修改nginx配置文件nginx.conf http { sendfile on; keepalive_timeout 65; server ...
- Nginx 设置临时维护页面
Nginx 设置临时维护页面 http://www.myexception.cn/open-source/1753957.html http://blog.justwd.net/snippets/ng ...
随机推荐
- Win10系统截屏快捷键
截全屏 win+prt scsysrq 图片位置:C:\Users\ASUS\Pictures\Screenshots 此电脑/图片/屏幕截图 截当前活动窗口 alt+prt scsysrq ...
- https://localhost:1158/em运行不正常
1.页面无法打开 一般是由于网站安全问题直接挂掉,可以更换浏览器,如Google Chrome.Fire Fox等.不建议使用IE Google浏览器使用如下, 直接继续 接着以用户sys,密码cha ...
- mysql utf8mb4 设置
[mysqld]collation-server=utf8mb4_general_ciinit-connect='SET NAMES utf8mb4'character-set-server=utf8 ...
- 使用Rancher和私有仓库快速搭建Kubernetes集群
来来来,先出题:Rancher可以快速部署Kubernetes,但其使用的gcr.io上的镜像无法下载怎么办?使用Rancher可以快速部署Kubernetes,但我们需要下载哪些镜像?Rancher ...
- Android View 阴影的总结
关于 Android 阴影,大家肯定不陌生的.但是Android 中到底有多少种方式可以实现阴影效果以及各种方式之间有什么区别和优缺点,这就是我想总结的.下面我们一个一个来说: 一.各种实现阴影的方式 ...
- Vmware ESXi 的虚拟机的开机自启动
ESXi 6.7 以前就注意到虚拟机有个菜单[action->autostart]可以用来自启动(物理机开机之后), 可是设置完之后,总是没成功. 今天重新google了,发觉不但虚拟机,整个物 ...
- [Hibernate] inner Join和 left Join
@Test public void test11(){ Session ss=HibernateUtil.getSession(); //根据员工名称(SCOTT)找到和他所在的部门的其他员工的信息 ...
- VS Code 安装sass插件
准备工作 在VS Code上新建一个项目,例:SASS ,文件夹内包括css 和 sass 和 html 文件夹 在sass文件下新新建sass.scss 1.在拓展商店里搜索“easy sa ...
- php 安装 redis扩展
https://segmentfault.com/a/1190000009422920 wget 源码编译
- Linux磁盘挂载
mount命令 用于加载文件系统到指定的加载点.此命令的最常用于挂载cdrom,使我们可以访问cdrom中的数据,因为你将光盘插入cdrom中,Linux并不会自动挂载,必须使用Lin ...