nginx 如何反代所有域名?

Publish: February 8, 2015 Category: 文档 No Comments

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。

请为这篇文章评分:
( 这篇文章尚未评分 )

Tags: none

Related Posts:
  • [尚无相关文章]

评论已关闭