nginx
xiaofengjiansa
这个作者很懒,什么都没留下…
展开
-
openresty相关应用代理配置
openresty相关应用代理配置修改响应头cookie加入secure修改响应头cookie加入secureheader_filter_by_lua_block{local cookies = ngx.header.set_cookieif cookies thenif type(cookies) == “table” thenlocal cookie={}for k,v in pairs(cookies) docookie[k]=v…";httponly"endngx.header.原创 2020-06-22 11:18:50 · 485 阅读 · 0 评论 -
nginx转换内置403错误
nginx作为静态文件代理服务器时,找不到文件会返回403错误页面,现将403错误页面转换为返回json数据返回。设置locationlocation /download/v1 { default_type application/octet-stream; alias "D:/Program Files/download"; autoindex off; ...原创 2018-10-09 11:59:44 · 719 阅读 · 0 评论 -
nginx常用配置项介绍
nginx常用配置项介绍1. 开启status页面检测服务状态nginx -V 检测有没有编译模块--with-http_sub_module 这个模块,就代表可以启用statuslocation /nginx_status { stub_status on; access_log off; }任意监听端口都能得到连接状态统计,http://...原创 2019-01-15 12:14:30 · 171 阅读 · 1 评论