nginx跑在10.10.10.10,upstream server为192.168.10.10:8080/aa/bb,我想实现当用户访问http://10.10.10.10:81时,自动指向http://192.168.10.10:8080/aa/bb,请问该如何设置nginx?
30 upstream cmk_syjk {
31 server 192.168.10.10:8080;
32 }
33 server {
34 listen 81;
35 server_name "";
36 location /aa/bb {
37 proxy_pass
http://cmk_syjk;
38 proxy_redirect off;
39 proxy_set_header Host $host;
40 proxy_set_header X-Real-IP $remote_addr;
41 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
42 client_max_body_size 10m;
43 client_body_buffer_size 128k;
44 proxy_connect_timeout 90;
45 proxy_send_timeout 90;
46 proxy_read_timeout 90;
47 proxy_buffer_size 4k;
48 proxy_buffers 4 32k;
49 proxy_busy_buffers_size 64k;
50 proxy_temp_file_write_size 64k;
51 }
52 }
不行。