502 Proxy Error

chuj625 nginx-forum at nginx.us
Sat Apr 17 14:50:02 MSD 2010


1 worker_processes 5;
2 error_log /var/log/nginx/error.log;
3 pid /var/log/nginx/nginx.pid;
4 worker_rlimit_nofile 8192;
5
6 events {
7 worker_connections 4096;
8 }
9
10 http {
11 default_type application/octet-stream;
12 log_format main '$remote_addr - $remote_user [$time_local] $status '
13 '"$request" $body_bytes_sent "$http_referer" '
14 '"$http_user_agent" "$http_x_forwarded_for"';
15
16 upstream ltp_server {
17 server 192.168.1.1:12345;
18 server 192.168.1.2:12345;
19 server 192.168.1.3:12345;
20 server 192.168.1.4:12345;
21 }
22
23 server { # LTP load balancing with password
24 listen 54321;
25 access_log /var/log/nginx/ltp.server.access.log main;
26
27 location / {
28 proxy_pass http://ltp_server;
29 auth_basic "TEST Web Service";
30 auth_basic_user_file ltpasswd;
31 }
32 }
33
34 server { # TEST load balancing without password
35 listen 12345;
36 access_log /var/log/nginx/test.server.access.log main;
37
38 location / {
39 proxy_pass http://ltp_server;
40 # auth_basic "TEST Web Service";
41 # auth_basic_user_file testpasswd;
42 }
43 }
44 }

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,76016,76038#msg-76038




More information about the nginx mailing list