I can’t manage to define multiple SSL certificates for each of my
server {} directive.
Only 1 SSL certificate is being sent by Nginx, thus creating warnings
in my browser when I want to access a different domain name which uses
a different certificate. Is that possible to do? In each server {}
block I have defined the exact server_name so Nginx should know where
to go.
Should I actually concatenate my 2 certificates into one file? Would
that thing work?
I cannot have separate IP for each certificate, as I will be hosting
many different websites that each use different certificates. I could
use a wildcard certificate and do a redirection such as site1.mainsite.com, but I find it’s an ugly solution.
But Nginx fails to start, and testing the configuration file returns a
failure but no error message.
Hmmm, that sounds weird. Set your error log to debug and HUP nginx
again while tailing the file. If you can kill -TERM nginx, make sure
its stopped and try starting it again. If it can’t start, because of
some config error, I believe it will print it to stderr.
I will use the IP based solution. However I am having problems, when I
specify: “listen myIP:443”, Nginx configuration file tester fails. Why
is that happening?
Should I actually concatenate my 2 certificates into one file? Would
that thing work?
Nope, and even if it did you would need some way of indicating which
certificate goes with which host, and your back to square one.
I cannot have separate IP for each certificate, as I will be hosting
many different websites that each use different certificates. I could
use a wildcard certificate and do a redirection such as site1.mainsite.com, but I find it’s an ugly solution.
So I tried with my real IP server, and it works. But when I add my IP
failover, it doesn’t.
How do I configure the IP on the host? Why would the host need to be
aware of its IP? Moreover, Nginx is running in a virtual machine, the
only IPs it is aware of are 127.0.0.1 and 10.0.0.1
And why do I need to configure any IP, as Nginx works with the real IP
of my server, why is it not working with the IP failover? By the way
the IP failover is correctly pointing to my server.
server {
listen IP1:443;
server_name www.site1.com;
}
server {
listen IP2:443;
server_name www.site2.com
}
And Nginx is running and there is no longer any error message. I am
not sure what made it work, but I also tweaked at my domain name
registrar the IP address of the domain name site2.com it now points to
IP2 (it used to point to IP1).
And entering http://www.site1.com or http://IP1 doesn’t work anymore!
What’s happening, is the “listen IP:Port” correctly working with Nginx
0.6.32? I am starting to wonder.
So I tried with my real IP server, and it works. But when I add my IP
failover, it doesn’t.
How do I configure the IP on the host? Why would the host need to be
aware of its IP? Moreover, Nginx is running in a virtual machine, the
only IPs it is aware of are 127.0.0.1 and 10.0.0.1
Um, those IP’s aren’t routable on the general internet, how are hosts
going to contact that machine ?
And why do I need to configure any IP, as Nginx works with the real IP
of my server, why is it not working with the IP failover? By the way
the IP failover is correctly pointing to my server.
If you want nginx to listen() on any IP address that is currently
configured for your server (/sbin/ifconfig) then you can say
listen 443;
However, because you need to bind a particular IP to a particular ssl
certificate, then you need to specify the IP you want each server
block assigned too in the config. Also, each of thoses IP’s have to be
valid at server startup time so that nginx can issue a successful
bind() call for each.
Can you give us some more background about your setup, and what you
are trying to do?
My website is: http://www.digiprof.fr, if you click the “connexion”
button at the top right corner, you will be redirected to a
registration page which uses SSL.
I have a mail server administration application reachable at http://www.digiprof.eu, you will get redirected to https and you
should see the certificate warning with www.digiprof.fr
I have changed my config files, http works, but now https doesn’t work
anymore, firefox can’t make the connection. However in my access.log I
see some references to https://www.digiprof.fr/login, but when I
access it myself, I don’t see it get printed in the log file.
On Tue, Oct 21, 2008 at 05:09:55PM +0200, Thomas wrote:
I have changed my config files, http works, but now https doesn’t work
anymore, firefox can’t make the connection. However in my access.log I
see some references to https://www.digiprof.fr/login, but when I
access it myself, I don’t see it get printed in the log file.