Django behind Squid

458 views Asked by At

please, I have problem with DJANGO behind reverse proxy SQUID...

Squid is set so that after recieve request it redirect me to another local port. This redirect works. From DJANGO I recieve ERROR 404 with this:

Request Method: GET
Request URL: http://a.server.cz:5500/http://a.server.cz:5500/


{u'path': u'http://a.server.cz:5500/'}

In terminal I see:

[26/Dec/2016 21:41:00] "GET http://a.server.cz:5500/ HTTP/1.1" 404 1696

I think, that problem is, that squid add squid server address to absolute path of request ...

Network scheme:

:--------------------------:
:                          :
:         INTERNET         :
:                          :
:--------------------------:
            :
            :
            : request - a.server.cz:5500
            :
a.server.cz :
:----------------------------:
:                            :
:      squid: 5500 -> 5501   :
:                            :
:                            :
:      DJANGO: listen 5501   :
:                            :
:----------------------------:

Please, can you help me?

Thank you!

EDIT:

my SQUID config

http_port 80 accel
http_port 5500 accel

cache_peer 127.0.0.1 parent 5501 no-query no-digest originserver name=serverA

acl all src all


http_access allow all
cache_peer_access serverA deny ws
0

There are 0 answers