ssl config problems binding to specific IP
Nick Pearson
nick.pearson at gmail.com
Sat Jul 25 00:35:59 MSD 2009
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 at 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
More information about the nginx
mailing list