![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
NGINX
懒人笔记—001
欢迎讨论、不喜勿喷;本人不喜欢写博客,几乎来自记事本或有道笔记的粘贴的过往或者现在的笔记,更多的是自己记录自己过往遇到小问题解决小问题的点滴,很多问题随着时间的过往已经感觉不应该当问题,但是还是贴出来了,供新人参考供自己回忆
展开
-
NGINX index.php 入口文件识别不了
场景:nginx配置好后,index.php 识别不了,直接跳过index.php 识别index.html ,删除index.html后,直接报错403 Forbidden解决办法一:没有indx.html就添加一个index.html空文件,在nginx配置文件中server 模块中添加一个重写规则即可rewrite ^/index.html(.*)$ /index.phppermanent;...原创 2021-04-27 13:44:27 · 916 阅读 · 0 评论 -
nignx IP和域名和跳转限制配置
一、重定向至指定的域名,避免网站ip访问流量流失server { listen 80 default; server_name _;# return 500; ##这里可以选择返回的状态玛或者自定义网页 rewrite ^(.*) https://www.mine.com.cn; ...... }二、...原创 2020-01-07 12:27:04 · 477 阅读 · 0 评论 -
nginx设置目录白名单、ip白名单
1.设置目录白名单:对指定请求路径不设置限制,如对请求路径为api目录下的请求不做限制,则可写为server{ location /app { proxy_pass http://192.168.1.111:8095/app; limit_conn conn 20; limit_rate 500k...转载 2019-11-13 09:52:02 · 2170 阅读 · 0 评论 -
转发:nginx的proxy_pass路径转发规则浅析(末尾/问题)
一 location匹配路径末尾没有 /此时proxy_pass后面的路径必须拼接location的路径: 1 2 3 4 5 6 7 8 location /sta { proxy_redirect off; proxy_set_headerHost $...转载 2019-11-06 21:24:01 · 944 阅读 · 0 评论 -
NGINX 最基本的防爬虫、防盗链
防爬虫在 [ server内location外 ]配置if ($http_user_agent ~* (baiduspider|360spider|haosouspider|googlebot|soso|bing|sogou|yahoo|sohu-search|yodao|YoudaoBot|robozilla|msnbot|MJ12bot|NHN|Twiceler)) { ...原创 2019-11-06 21:16:11 · 595 阅读 · 0 评论 -
nginx 反向代理实现镜像网站配置
下面是本人测试的nginx配置文件,没做注释,不懂的可看你nginx参数就行(包括单个和集群)### You should look at the following URL's in order to grasp a solid understanding# of Nginx configuration files in order to fully unleash the power...原创 2019-11-06 13:59:18 · 3150 阅读 · 0 评论 -
nginx配置(restful),例如laravel
server { listen 80; server_name localhost:80; location / { root /usr/local/nginx/html/zyq/; index index.php server.php index.html index.htm; try_files $u...原创 2019-10-24 10:22:10 · 1442 阅读 · 0 评论 -
linux 最简单的nginx php配置文件
[root@localhost nginx]# cat nginx.conf# For more information on configuration, see:# * Official English Documentation: http://nginx.org/en/docs/# * Official Russian Documentation: http://nginx....原创 2019-08-14 19:57:03 · 102 阅读 · 0 评论 -
centos7 搭建LNMP环境(centos7.2+php7+mysql5.7+nginx1.11+redis3.2)
https://zixuephp.net/article-262.html翻译 2019-08-13 20:09:25 · 158 阅读 · 0 评论 -
php时区设置后获取各不相同????
php.ini :[CLI Server]; Whether the CLI web server uses ANSI color coding in its terminal output.cli_server.color = On[Date]; Defines the default timezone used by the date functions; http://ph...原创 2019-06-11 14:01:20 · 259 阅读 · 0 评论 -
NGINX和PHP 使用SOCKET通信错误 An error occurred.
环境:centos7.5 、NGINX、PHP7.2 (php和nginx都是全麻编译安装手动配置)将nginx和php之间的通信将http转为socket结果报错了错误:An error occurred.Sorry, the page you are looking for is currently unavailable.Please try again late...原创 2019-06-14 10:48:02 · 560 阅读 · 0 评论 -
deepin/ubuntu apt-get快速安装的apache、php7.2和nginx和php7.2
下面是在国产linux deepin里面测试的,下面是history,下面是先安装apache和php7.2 然后有卸载安装nginx和php7.2 ,第一次php安装是以apache模块的方式安装,所以安装完成没有php-fpm 209 apt list | grep libapache2-mod-php* 211 apt list | grep libapache2-mod-ph...原创 2019-05-05 19:11:53 · 3082 阅读 · 0 评论 -
centos7 编译安装NGINX
叙: 源码编译安装都没什么具体去区别,就是下载源码包解压编译安装配置如果有什么依赖的安装器就行,这是我以前看到的一篇有思路的笔记,具体地址忘记了,步骤都一样,我对其中部分做了修改。主要是想用其文字叙述。其中6.7.8有点废话,一般不会这么用,直接配置环境变量就行,但是我还是没删除!6.7.8可修改为:echo "export PATH=$PATH:/usr/local/ng...原创 2019-04-18 09:45:56 · 172 阅读 · 0 评论 -
NGINX+PHP +Memcached负载均衡下的session共享简单配置
前提:安装好需要的各个服务以及相关扩展1、nginx方向代理配置,具体参数自己去看,有很多很多参数设置,网上一搜也是一大堆http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; ...原创 2019-04-05 11:47:02 · 225 阅读 · 0 评论 -
nginx 配置笔记
1.域名server { listen 80; server_name zj.laravel.com ; root "D:/phpStudy/PHPTutorial/WWW/blog/public"; location / { index index.html index.htm inde原创 2018-01-25 10:04:22 · 275 阅读 · 0 评论