| 1 | http { |
|---|
| 2 | #ææ°ç 论åæå¡ |
|---|
| 3 | upstream WEB_APP { |
|---|
| 4 | server piebbs.pconline.com.cn:80; |
|---|
| 5 | } |
|---|
| 6 | #èè¶
åŒåºçšçå¬æå¡ |
|---|
| 7 | server { |
|---|
| 8 | listen 80; |
|---|
| 9 | server_name best.pconline.com.cn; |
|---|
| 10 | |
|---|
| 11 | location ~ ^/bbs/$ { |
|---|
| 12 | rewrite /bbs/ /forum-best.html; break; |
|---|
| 13 | proxy_pass http://WEB_APP; |
|---|
| 14 | proxy_redirect off; |
|---|
| 15 | proxy_set_header Host $host; |
|---|
| 16 | proxy_set_header X-Real-IP $remote_addr; |
|---|
| 17 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | location ~ ^/bbs/(.*) { |
|---|
| 21 | rewrite /bbs/(.*) /$1; break; |
|---|
| 22 | proxy_pass http://WEB_APP; |
|---|
| 23 | proxy_redirect off; |
|---|
| 24 | proxy_set_header Host $host; |
|---|
| 25 | proxy_set_header X-Real-IP $remote_addr; |
|---|
| 26 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | } # end of server |
|---|
| 30 | |
|---|
| 31 | } # end of http |
|---|