| From | Sent On | Attachments |
|---|---|---|
| lovewadhwa | Apr 29, 2009 7:08 am | |
| lovewadhwa | Apr 30, 2009 4:25 am | |
| Igor Sysoev | Apr 30, 2009 5:07 am | |
| Joe Bofh | Apr 30, 2009 3:48 pm | |
| Igor Sysoev | Apr 30, 2009 10:45 pm | |
| Joe Bofh | Apr 30, 2009 11:38 pm | |
| Igor Sysoev | Apr 30, 2009 11:43 pm | |
| Joe Bofh | May 1, 2009 1:13 am | |
| Joe Bofh | May 1, 2009 1:15 am | |
| Igor Sysoev | May 1, 2009 1:36 am |
| Subject: | Re: ssl accelerator | |
|---|---|---|
| From: | Igor Sysoev (is...@rambler-co.ru) | |
| Date: | Apr 30, 2009 5:07:46 am | |
| List: | ru.sysoev.nginx | |
On Wed, Apr 29, 2009 at 10:08:49AM -0400, lovewadhwa wrote:
Hi
I m using nginx to configure ssl accelerator.Have specified the following in my
configuration file to accomplish the same:
upstream dev1.magazine.com{ server dev1.magazine.com:8000; }
server { listen 443; server_name 192.168.8.31; ssl on; ssl_certificate server.crt; ssl_certificate_key server.key; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-FORWARDED_PROTO https; proxy_redirect false; if (!-f $request_filename) { proxy_pass http://dev1.magazine.com; } root html; index index.html index.htm; }
Setting the above things in my configuration file, i have my request say
https://192.168.8.31 being translated to http://dev1.magazine.com on port 8000,
but the page returned is over http instead of that being https. Please help.
Probably, you need to rewrite redirects:
proxy_redirect http://dev1.magazine.com:8000/ /;
Also, it's better to use this configuration
location / { root html; index index.html index.htm; try_files $uri @magazine; }
locaiton @magazine { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-FORWARDED_PROTO https;
proxy_pass http://dev1.magazine.com:8000; }
without "if" and "upstream dev1.magazine.com".
By default
proxy_pass http://dev1.magazine.com:8000;
also adds
proxy_redirect http://dev1.magazine.com:8000/ /;
-- Igor Sysoev http://sysoev.ru/en/





