原文地址html
worker_processes 8; worker_rlimit_nofile 65535; #pid logs/nginx.pid; events { use epoll; worker_connections 8192; } http { include mime.types; default_type application/octet-stream; log_format main '$cookie_sessionid $http_cookie $host $http_host $proxy_host $server_name $remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '$ssl_protocol $ssl_cipher $upstream_addr $request_time $upstream_response_time'; access_log logs/access.log main; sendfile on; keepalive_timeout 65; gzip off; upstream backend{ server 192.168.1.1:443; } server { #監聽443端口,SSL默認使用端口 listen 443; server_name www.go008.com; #開啓SSL功能 ssl on; #證書文件 ssl_certificate /usr/local/nginx/conf/ssl/crt1.crt; #私鑰文件 ssl_certificate_key /usr/local/nginx/conf/ssl/key1.key; #ssl_session_timeout 5m; location /nstatus { access_log off; } location / { proxy_pass https://backend; proxy_redirect off; proxy_set_header Host 192.168.1.1; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Cookie $http_cookie; chunked_transfer_encoding off; proxy_pass_header Set-Cookie; proxy_cookie_domain 192.168.1.1 www.tops001.com; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }