上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页

2018年1月7日

nginx 访问控制

摘要: nginx 访问控制 可以匹配正则 location ~ .*(abc|image)/.*\.php$ { deny all; } 根据user_agent限制 if ($http_user_agent ~ 'Spider/3.0|YoudaoBot|Tomato') { return 403; } 阅读全文

posted @ 2018-01-07 22:58 游荡的鱼 阅读(148) 评论(0) 推荐(0) 编辑

nginx 防盗链

摘要: nginx 防盗链 参考链接:http://nginx.org/en/docs/http/ngx_http_referer_module.html 来自模块: Module ngx_http_referer_module 指令: refere_hash_bucket_sizeSets the buc 阅读全文

posted @ 2018-01-07 22:20 游荡的鱼 阅读(208) 评论(0) 推荐(0) 编辑

2018年1月4日

nginx 访问日志和切割日志

摘要: nginx 访问日志 日志格式vim /usr/local/nginx/conf/nginx.conf //搜索log_format $remote_addr: 客户端IP(公网IP)$http_x_forwarded_for: 代理服务器IP$time_local: 服务器本地时间$host: 访 阅读全文

posted @ 2018-01-04 10:33 游荡的鱼 阅读(174) 评论(0) 推荐(0) 编辑

nginx 静态文件不记录日志和过期时间

摘要: 静态文件不记录日志和过期时间 /usr/local/nginx/conf/vhost/test01.conf 增加配置如下 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 7d; #有效时间 access_log off; #关闭日志 } l 阅读全文

posted @ 2018-01-04 10:31 游荡的鱼 阅读(368) 评论(0) 推荐(0) 编辑

nginx 域名重定向

摘要: nginx 域名重定向 在conf/vhost/中添加 test02.conf 文件 server { listen 80; server_name www.test02.com test02.com test2.com; index index.html index.htm index.php; 阅读全文

posted @ 2018-01-04 01:51 游荡的鱼 阅读(230) 评论(0) 推荐(0) 编辑

nginx 用户认证

摘要: nginx 用户认证 vim /usr/local/nginx/conf/vhost/test.com.conf server { listen 80; server_name test.com; index index.html index.htm index.php; root /data/ww 阅读全文

posted @ 2018-01-04 01:49 游荡的鱼 阅读(143) 评论(0) 推荐(0) 编辑

nginx 默认虚拟主机

摘要: nginx 默认虚拟主机 vim /usr/local/nginx/conf/nginx.conf //增加include vhost/*.conf; //加在http中 mkdir /usr/local/nginx/conf/vhost cd !$; vim default.conf /usr/l 阅读全文

posted @ 2018-01-04 01:49 游荡的鱼 阅读(121) 评论(0) 推荐(0) 编辑

nginx 安装

摘要: nginx 安装 cd /usr/src/local wget http://nginx.org/download/nginx-1.12.2.tar.gz tar -zxvf nginx-1.12.2.tar.gz ./configure —prefix=/usr/local/nginx make 阅读全文

posted @ 2018-01-04 01:48 游荡的鱼 阅读(162) 评论(0) 推荐(0) 编辑

2018年1月2日

LNMP-PHP安装

摘要: PHP安装 和LAMP安装PHP是有差别的,需要开启php-fpm服务 cd /usr/src/local/ wget http://hk1.php.net/get/php-7.2.0.tar.gz/from/this/mirror #下载7.2.0 ./configure --prefix=/us 阅读全文

posted @ 2018-01-02 22:36 游荡的鱼 阅读(869) 评论(0) 推荐(0) 编辑

LNMP架构介绍

摘要: LNMP架构介绍 LNMP和LAMP 不同的是提供web服务的是Nginx PHP是作为一个独立服务存在的,这个服务叫做php-fpm Nginx直接处理静态请求,动态请求会转发给php-fpm 用户浏览器 ——Nginx——-php-fpm | | 静态文件 mysql nginx 介绍 Ngin 阅读全文

posted @ 2018-01-02 22:35 游荡的鱼 阅读(336) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页

导航