Welcome! Log In Create A New Profile

Advanced

Re: http to https rewrite, non-standard port?

January 07, 2013 04:16AM
I tried the above but Cant seem to get it working : please see below

......
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

server {
listen 9000;
server_name iossapp1.com;

if ($scheme = 'http') {
rewrite ^ https://$server_name:9443$request_uri? permanent;
}
}

ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;

server {
listen 9443 ssl;
server_name iossapp1.com;

error_page 497 https://$host:9443$request_uri;

location / {
proxy_pass http://127.0.0.1:9001;
proxy_set_header Host $host;
# proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}


Any help would be much appreciated
Subject Author Posted

http to https rewrite, non-standard port?

J2R December 06, 2010 06:52AM

Re: http to https rewrite, non-standard port?

Igor Sysoev December 06, 2010 07:04AM

Re: http to https rewrite, non-standard port?

Quincy August 03, 2011 04:20AM

Re: http to https rewrite, non-standard port?

cyberjar09 January 07, 2013 05:01AM

Re: http to https rewrite, non-standard port?

Maxim Dounin August 03, 2011 04:44AM

Re: http to https rewrite, non-standard port?

Igor Sysoev August 03, 2011 03:10PM

Re: http to https rewrite, non-standard port?

Igor Sysoev August 03, 2011 03:06PM

Re: http to https rewrite, non-standard port?

Quincy August 04, 2011 05:04AM

Re: http to https rewrite, non-standard port?

cyberjar09 January 07, 2013 04:16AM

Re: http to https rewrite, non-standard port?

cyberjar09 January 07, 2013 04:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready