随笔分类 - nginx
摘要:1. 隐藏版本号 1.0 nginx: http { .... server_tokens off; } 1.1 php: expose_php = Off 2. 错误页面友好显示 1). 在http模块中开启:fastcgi_intercept_errors on; (注意必须开启,否则不生效)
阅读全文
摘要:内置变量存放在 ngx_http_core_module 模块中,变量的命名方式和apache 服务器变量是一致的。总而言之,这些变量代表着客户端请求头的内容,例如$http_user_agent, $http_cookie, 等等。下面是nginx支持的所有内置变量: $arg_name请求中的的
阅读全文
摘要:nginx 反向代理时,php setcookie() 出现异常。 location ^~ /special/ { proxy_set_header client-ip $remote_addr; proxy_set_header x-forwarded-for $proxy_add_x_forwa
阅读全文
摘要:编辑nginx.conf文件,如下: upstream mywebs { ip_hash; server 192.168.1.11:8088; #要转发去的地址和端口 } server { listen 8088; server_name localhost; ...
阅读全文
摘要:+-----------------------------------------------------------------------------------------------------------------------------------------------------...
阅读全文
浙公网安备 33010602011771号