nginx 如何反代所有域名?
Posted by he; tagged with none
server { listen 10.10.0.3:81; client_body_timeout 60000; client_max_body_size 1024m; send_timeout 60000; client_header_buffer_size 16k; large_client_header_buffers 4 64k; proxy_headers_hash_bucket_size 1024; proxy_headers_hash_max_size 4096; proxy_read_timeout 60000; proxy_send_timeout 60000; location / { auth_basic "WelCome to OkamiNetwork,Enter your password please~:"; auth_basic_user_file /usr/local/nginx/htpasswd; resolver 8.8.8.8; proxy_pass http://$http_host$request_uri; } }
不填resolver会导致502。