首页天道酬勤nginx配置代理转发,如何查看nginx转发日志

nginx配置代理转发,如何查看nginx转发日志

张世龙 05-12 16:54 81次浏览

以下是针对没有ssl证书的请求的服务器{ listen 80; 服务器_ name API.* * * *.com; #以下指定转发到某个端口#location ~* /union { #以下全部转发到某个端口location/{ client _ max _ body _ size 3000 m。 proxy _ next _ upstream http _ 502 http _ 504 errortimeoutinvalid _ header; proxy_set_header Host $host; proxy _ set _ headerx-real-IP $ remote _ addr; proxy _ set _ headerx-real-port $ remote _ port; proxy _ set _ headerx-forwarded-for $ proxy _ add _ x _ forwarded _ for; proxy _ pass http://127.0.0.1:8080; proxy_redirect default; proxy_connect_timeout 3000; if($http_origin(https://).* ) ****.com) { set $allow_url $http_origin; }if($request_method=OPTIONS ) add _ header access-control-allow-methods ' get,POST,PUT,DELETE,options # add _ header access -控制- allow-origin *; add _ header访问控制- allow-headers ' cookie,Set-Cookie,Origin,X-Requested-With,token,authorization add _ header content-type ' text/plain; charset=utf-8 '; add_header Content-Length 0; 返回204; }}以下为有ssl要求时的server { listen 80; 服务器_ name API.* * * *.com; rewrite ^(.* ) $ https://$ { server _ name } $1permanent; }server { listen 443; 服务器_ name API.* * * *.com; ssl on; SSL _ certificate/etc/nginx/cert/API.PEM; SSL _ certificate _ key/etc/nginx/cert/API.key; ssl_session_timeout 5m; SSL _ ciphersecdhe-RSA-AE s128-GCM-sha 2563360 ECD he : ecdh : AES 3360 high : 空: aNULL: MD5: ADH: RC4; SSL _ protocolstlsv1tlsv 1.1 tlsv 1.2; ssl_prefer_server_ciphers on; #以下指定转发到某个端口#location ~* /union { #以下全部转发到某个端口location/{ client _ max _ body _ size 3000 m。 proxy _ next _ upstream http _ 502 http _ 504 errortimeoutinvalid _ header; proxy_set_header Host $host; proxy _ set _ headerx-real-IP $ remote _ addr; proxy _ set _ headerx-real-port $ remote _ port; proxy _ set _ headerx-forwarded-for $ proxy _ add _ x _ forwarded _ for; proxy _ pass http://127.0.0.1:8080; proxy_redirect default; proxy_connect_timeout 3000; if($request_method=OPTIONS ) add _ header access-control-allow-methods ' get,POST,PUT,DELETE,options add add _ header访问控制- allow-headers ' cookie,Set-Cookie,Origin,X-Requested-With,token,authorization add _ header content-type ' text/plain; charset=utf-8 '; add_header Content-Length 0; 返回204; } }

转载于:https://www.cn blogs.com/hahahehehexixihoho/p/10831613.html

期货实时数据从哪获取,期货历史数据回测 nginx打开转发日志信息配置,nginx百万转发需要什么配置