apache nginx header 删除 配置
发表于|更新于|others
|浏览量:
apache 删除响应header
1 | Header unset Access-Control-Allow-Origin |
apache 增加header
1 | Header set Access-Control-Allow-Methods * |
nginx 增加header
1 | add_header Access-Control-Allow-Origin $http_origin always; |
文章作者: developer
文章链接: http://example.com/2020/06/29/apache%20nginx%20header%20%E5%88%A0%E9%99%A4%20%E9%85%8D%E7%BD%AE/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2020-06-24
nginx 配置 转发
1234567server { listen 80; server_name geo.datav.aliyun.com; location / { proxy_pass http://geo.datav.aliyun.com; }}
2020-04-16
docker nginx 获取真实 客户端 ip
解决办法修改ports例如如下服务 123456789101112131415nginx: image: "nginx:alpine" ports: - target: 80 published: 80 protocol: tcp mode: host - target: 443 published: 443 protocol: tcp mode: host networks: backend: aliases: - "nginx" 其他介绍原文地址https://blog.csdn.net/fengyilin_henu/article/details/84912763 host模式和ingress模式介绍http://c.biancheng.net/view/3195.html 正常发布服务后,使用host模式更新服务 12345docker service update app_nginx \ --publish-rm 8...
2018-07-10
phpRedisAdmin php redis 可视化 管理工具 配置
phpRedisAdmin可以从github下载 配置方法默认情况下没有密码直接连接即可但是很多时候 比如云redis是有密码这时候配置一个数组,增加auth字段即可实例如下: 12345678910array( 'name' => 'qcloud redis', 'host' => 'ip', 'port' => 6379, 'filter' => '*', 'scheme' => 'tcp', 'path' => '', // 以下为需要配置的密码 'auth' => 'mycode' ),
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 # 服务器...
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-11-18
apache 工作模式 prefork worker event
Apache的多进程处理模块(MPM)只要有三种 123prefork worker event 其中event是后来加入的,有很多优点 eventevent模式好像很类似nginx的方式这个是Apache中最新的模式,在2.4里的已经是稳定可用的模式。它和worker模式很像,最大的区别在于,它解决了keep-alive场景下,长期被占用的线程的资源浪费问题(某些线程因为被keep-alive,空挂在哪里等待,中间几乎没有请求过来,甚至等到超时)。event MPM中,会有一个专门的线程来管理这些keep-alive类型的线程,当有真实请求过来的时候,将请求传递给服务线程,执行完毕后,又允许它释放。这样增强了高并发场景下的请求处理能力。event MPM在遇到某些不兼容的模块时,会失效,将会回退到worker模式,一个工作线程处理一个请求。官方自带的模块,全部是支持event MPM的。注意一点,event MPM需要Linux系统(Linux 2.6+)对EPoll的支持,才能启用。还有,需要补充的是HTTPS的连接(SSL),它的运行模式仍然是类似worker的方式,线程会...
公告
This is my Blog