Welcome! Log In Create A New Profile

Advanced

Re: ssl config problems binding to specific IP

Nick Pearson
July 24, 2009 04:35PM
I believe the preferred way is still to use separate server blocks for
http and https.

server {
server_name mydomain.com;
listen 192.168.0.11:80;
...
}

server {
server_name mydomain.com;
listen 192.168.0.11:443;
ssl on;
...
}

The error is probably caused by having "ssl on" for http requests.
I've seen people asking about putting the ssl config inside an "if",
but I don't think that's preferred.

Nick



On Fri, Jul 24, 2009 at 3:16 PM, Jon Hancock<jhancock@shellshadow.com> wrote:
> using nginx 0.7.61
> server {
> server_name mydomain.com;
> listen 80;
> listen 443 default ssl;
> ...
> }
> works!!!
> When I use IP addresses, I get problems:
> server {
> server_name mydomain.com;
> listen 192.168.0.11:80;
> listen 192.168.0.11:443 default ssl;
> ...
> }
> When I add the IP address, HTTPS works, but HTTP requests give me: 404 Bad
> Request - The Plain HTTP request was sent to HTTPS port
> I need to specify the IP so I can have another server block for a second SSL
> server
> Any ideas?
> thanks, Jon
Subject Author Posted

ssl config problems binding to specific IP

Jon Hancock July 24, 2009 04:16PM

Re: ssl config problems binding to specific IP

Nick Pearson July 24, 2009 04:35PM

Re: ssl config problems binding to specific IP

merlin corey July 25, 2009 07:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 127
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready