nginx 实现获取请求端的真实ip接口
server { listen 8910 ssl; server_name localhost,xxx.xxx.com; client_max_body_size 2048m; #ssl on; ssl_certificate ssl/xxx.crt; ssl_certificate_key ssl/xxx.key; ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.2; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 6; gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript application/json image/jpeg image/jpg image/gif image/png; gzip_disable "MSIE [1-6]\."; gzip_vary on; # 获取请求端的真实ip location /myIp { return 200 "$remote_addr"; default_type text/html; } }
一些事情一直在干,说不定以后就结果了呢
本文来自博客园,作者:chenjianwen,转载请注明原文链接:https://www.cnblogs.com/chenjw-note/p/16895022.html