nginx 配置 转发
发表于|更新于|php
1 | server { |
文章作者: developer
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2020-06-29
apache nginx header 删除 配置
apache 删除响应header 1Header unset Access-Control-Allow-Origin apache 增加header 1Header set Access-Control-Allow-Methods * nginx 增加header 1add_header Access-Control-Allow-Origin $http_origin always;
2019-03-01
nginx 访问某个目录转发到固定域名并去掉目录名
123456789location /exhibition/ { index index.html index.htm; proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://127.0.0.1:8080/; break;} 注意要点1location /exhibition/ 这个后一个斜线要加,否则请求到后端会多一个/ 1proxy_pass http://127.0.0.1:8080/; 这个后一个斜线要加,否则会带上目录名
2017-09-02
php apache 配置 https ssl phpstudy 开启 Forward Secrecy 前向保密
SSL HTTPS检测获得A+的方法 检测地址 https://www.ssllabs.com/ssltest/ apache版本 2.4 开启php的openssl模块 开启apache的ssl模块 一般大家是用apache虚拟机的增加如下配置 1234567891011121314151617181920212223242526272829Listen 443<VirtualHost *:443> DocumentRoot "C:\php\www" ServerName iguojin.com ServerAlias # 开启HSTS长期有效 Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" # 开启SSL SSLEngine on # 添加SSL协议支持协议 SSLProtocol all -SSLv2 -SSLv3 # 服务器...
2018-07-10
phpRedisAdmin php redis 可视化 管理工具 配置
phpRedisAdmin可以从github下载 配置方法默认情况下没有密码直接连接即可但是很多时候 比如云redis是有密码这时候配置一个数组,增加auth字段即可实例如下: 12345678910array( 'name' => 'qcloud redis', 'host' => 'ip', 'port' => 6379, 'filter' => '*', 'scheme' => 'tcp', 'path' => '', // 以下为需要配置的密码 'auth' => 'mycode' ),
2019-08-11
nginx 封禁ip 和 ip段
增加黑名单在nginx.conf同目录新建nginx.blockip.conf 引入配置可以放在虚拟机配置里,这里放在全局的nginx.confhttp里最后增加一行 12# 封禁ipinclude nginx.blockip.conf; 配置黑名单12deny 5.188.0.0/16;deny 5.188.210.5; 第一个是封禁网段,16代表ip转换为2进制后,前16位有效,只要前16位相同就会被封禁第二个是封禁具体ip
2018-01-31
Supervisor 配置 使用 常见问题 thinkphp 队列 使用方法
安装安装方法很多,这里给出最简便的 123wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py -O - | sudo pythoneasy_install supervisor 然后 1find / -name supervisord.conf 找到supervisord.conf路径 1echo_supervisord_conf > /etc/supervisord.conf 在找到的空配置中生成示例配置 详细方法http://blog.csdn.net/xyang81/article/details/51555473 配置最后一行 123;包含其它配置文件[include]files = relative/directory/*.ini ;可以指定一个或多个以.ini结束的配置文件 这里注意!!!*[include]*前的 ; 要去掉,否则不会加载 ini 配置!!! 使用在你inclue的目录中加一个ini 1234567891011[program:thinkphp]command...
公告
This is my Blog