recherche

Maison  >  Questions et réponses  >  le corps du texte

httproxy - Problème de proxy inverse nginx

Je souhaite créer un proxy inverse pour slideshare, la configuration est la suivante, mais cela échoue toujours.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

<code> 4     error_log /data/logs/slideshare.error.log;

  5     server_name ssk.timger.info;

  6     proxy_cache_key "$scheme://$host$request_uri/slideshare";

  7     proxy_cache cache_one;

  8     proxy_max_temp_file_size 4m;

  9

 10     location / {

 11         proxy_cache_valid  200 304 3h;

 12         #proxy_cache_valid 301 3d;

 13         proxy_cache_valid any 10s;

 14         proxy_set_header   X-Real-IP  $remote_addr;

 15         proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

 16         #向后端传递访客ip

 17

 18         proxy_set_header   Referer http://www.slideshare.net/;

 19         #强制定义Referer,程序验证判断会用到

 20

 21         proxy_set_header   Host $host;

 22

 23         proxy_pass http://www.slideshare.net/;

 24

 25         proxy_redirect default;

 26         proxy_redirect http://www.slideshare.net/ /;

 27

 28

 29         proxy_connect_timeout   60;

</code>

Voici les résultats de ma visite après procuration

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

<code>HTTP/1.1 301 Moved Permanently

Server: nginx/1.2.1

Date: Sat, 01 Feb 2014 14:02:43 GMT

Content-Type: text/html

Content-Length: 178

Location: http://ssk.timger.info/

Connection: keep-alive

P3P: CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND"

Accept-Ranges: bytes

X-Varnish: 1736312165

Age: 0

Via: 1.1 varnish

Set-Cookie: SERVERID=r3|Uuz+h|Uuz+h; path=/

 

<html>

<head><title>301 Moved Permanently</title></head>

<body bgcolor="white">

<center><h1>301 Moved Permanently</h1></center>

<hr><center>nginx</center>

</body>

</html>

</code>

Erreur 301, je ne connais pas la raison

曾经蜡笔没有小新曾经蜡笔没有小新2871 Il y a quelques jours616

répondre à tous(1)je répondrai

  • 漂亮男人

    漂亮男人2017-05-16 17:30:08

    L'anti-génération est proxy_pass

    répondre
    0
  • Annulerrépondre