某互联网企业技术发展史(四)配置nginx和mysql兼容Yii框架,上传网站并调试成功...
Your MySQL connection id is 5
Server version: 5.1.67 Source distribution
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
查询账号信息:
| host | user | password |
+--------------+------+-------------------------------------------+
| localhost | root | *3DC3333qE11EEF04038E306BC8779D651 |
| 127.0.0.1 | root | |
| localhost | | |
+--------------+------+-------------------------------------------+
3 rows in set (0.00 sec)
添加可远程登录的新管理员账号:
| host | user | password |
+--------------+-------+-------------------------------------------+
| localhost | root | *3DC8AE44442111DE11EEF04038E306BC8779D651 |
| 127.0.0.1 | root | |
| localhost | | |
| % | testroot | *3DC8AE08411DE11EEF04038E306BC8779D651 |
+--------------+-------+-------------------------------------------+
4 rows in set (0.00 sec)
删除匿名账户:
worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 50000;
}
http {
include /etc/nginx/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 /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
include /etc/nginx/conf.d/*.conf;
}
listen 8080;
server_name localhost;
charset utf-8;
access_log /var/log/nginx/log/host.access.log main;
location / {
root /var/www/html;
index index.html index.htm default.htm default.html index.php default.php;
add_header Content-Type "text/html; charset=UTF-8";
add_header Content-Encoding "gzip";
}
# Disable logging for favicon
location = /favicon.ico {
log_not_found off;
access_log off;
}
# Disable logging for robots.txt
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~* \.(jpg|jpeg|png|gif|css|js|swf|mp3|avi|flv|xml|zip|rar)$ {
expires 7d;
gzip on;
gzip_types text/plain application/x-javascript text/css application/xml;
root /var/www/html;
}
location ~ /.svn/* {
deny all;
access_log off;
log_not_found off;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /var/www/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include fastcgi_params;
}
# yii configuration
include conf.d/yii.common.conf.internal;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
# Block access to protected, framework, and nbproject (artifact from Netbeans)
location ~ /(yii|protected|framework|nbproject) {
deny all;
access_log off;
log_not_found off;
}
# Block access to theme-folder views directories
location ~ /themes/\w+/views {
deny all;
access_log off;
log_not_found off;
}
# Attempt the uri, uri+/, then fall back to yii's index.php with args included
# Note: old examples use IF statements, which nginx considers evil, this approach is more widely supported
location /testweb {
index index.php;
try_files $uri $uri/ /testweb/index.php?$args;
}
转载于:https://blog.51cto.com/babyhe/1166999
某互联网企业技术发展史(四)配置nginx和mysql兼容Yii框架,上传网站并调试成功...相关推荐
- nginx与mysql传输过程_某互联网企业技术发展史(四)配置nginx和mysql兼容Yii框架,上传网站并调试成功...
昨天安装好了php.nginx和squid,今天配置mysql和nginx,使nginx兼容Yii框架,并上传网站,将网站调试和配置好. 1, 首先配置下php的时区 # vi /etc/php.in ...
- centos7二进制安装php,Centos7下编译安装配置Nginx+PHP+MySql环境
序言 这次玩次狠得.除了编译器使用yum安装,其他全部手动编译.哼~ 看似就Nginx.PHP.MySql三个东东,但是它们太尼玛依赖别人了. 没办法,想用它们就得老老实实给它们提供想要的东西. 首先 ...
- linux nginx编译安装mysql_Centos7下编译安装配置Nginx+PHP+MySql环境
序言 这次玩次狠得.除了编译器使用yum安装,其他全部手动编译.哼~ 看似就Nginx.PHP.MySql三个东东,但是它们太尼玛依赖别人了. 没办法,想用它们就得老老实实给它们提供想要的东西. 首先 ...
- phpfpm怎么连接mysql_配置nginx、mysql、php-fpm的方法
mac下使用homebrew安装安装.配置nginx.mysql.php-fpm的方法. 一.前话: 1.1.环境选择: 重新在mac上配置php,原本mac上就自带有apach.php以及pgsql ...
- windows7 nginx php mysql_windows7配置Nginx+php+mysql的详细教程
最近在学习php,想把自己的学习经历记录下来,并写一些经验,仅供参考交流.此文适合那些刚刚接触php,想要学习并想要自己搭建Nginx+php+mysql环境的同学. 当然,你也可以选择集成好的安装包 ...
- Nginx 代理转发阿里云OSS上传的实现代码
这篇文章主要介绍了Nginx 代理转发阿里云OSS上传的实现代码,小编觉得挺不错的,现在分享给大家,也给大家做个参考.一起跟随小编过来看看吧 前言 因为小程序上传需要https,服务器https用的是 ...
- 电商生鲜网站开发(四)——后台开发:商品模块-图片上传/多条件拼接sql
电商生鲜网站开发(四)--后台开发:商品模块-图片上传/多条件拼接sql 增加商品 上传图片 更新商品 删除商品 批量上下架 图片上传功能 文件名UUID 通用唯一识别码(Universally Un ...
- Centos配置Jenkins实现Android自动打包并上传到蒲公英
本篇文章来自 徐永红 的投稿,给大家讲解Centos配置Jenkins实现Android自动打包并上传到蒲公英,希望对大家有所帮助. 徐永红 的博客地址: https://xuyonghong.cn ...
- 迟到的总结(四)--springmvc的系统学习之文件上传、ajaxjson处理
前序:本篇主要将springmvc框架中文件的上传,json数据的配置.由于视频中的文件上传的实现运用到io流,属于比较老的方式,故本篇将重点不放在代码的实现,主要目的是过一下配置文件.改天再择取时间 ...
最新文章
- Android Handler sendMessage和 sendMessageDelayed的使用
- 百度谷歌等联合推出机器学习基准 加速AI软硬件发展
- Android开发--Json数据的解析
- MATLAB实战系列(三十四)-MATLAB基于PCA-LDA模糊神经网络的人脸识别
- 量子计算101:浅谈其需求、前景和现实
- virtualenv创建python项目虚拟环境
- HTML5学习笔记四: 列表, 块和布局
- [react] React的displayName有什么作用?
- 方维系统登陆弹窗,登陆后自动刷新当前页的实现方法
- 快速打开内网服务器文件,Linux服务器局域网(内网)快速传输文件
- 关系传递闭包Warshall算法之思想的一种解说
- java中UUID类生成32位随机数(附加 6 位随机数)
- word刷子刷格式_用word格式刷快速调整文档格式-word技巧-电脑技巧收藏家
- 新浪微博架构和FEED架构分析--人人架构
- 前端战五渣学前端——模板引擎(Handlebars.js)
- 视频怎么转为GIF,如何制作GIF
- windows7计算机无法到达,win7电脑突然无法进入到安全模式了怎么办?
- mysql 中文截断_Mysql入库汉字被截断问题
- RiPro美化二开详细修改路径介绍
- 计算机操作系统实验指导linux版,操作系统实验指导书(linux版).doc