I would like to have two domains, each with their own SSL cert, each SSL cert has its own IP of course, to point to the same web site on one physical server. The server will have to have two IPs too of course. What is this called? How is this done with nginx? OS is Linux. Thanks!
Create two server
entries with different listen
and ssl_certificate(_key)
directives using the different IP addresses but the same root
where your shared web pages are stored. For example:
server {
listen 1.2.3.4:443;
server_name first-domain.example;
root /srv/html/shared_domain_data;
ssl on;
ssl_certificate /etc/nginx/ssl/first_domain.pem;
ssl_certificate_key /etc/nginx/ssl/first_domain_key.pem;
}
server {
listen 9.8.7.6:443;
server_name second-domain.example;
root /srv/html/shared_domain_data;
ssl on;
ssl_certificate /etc/nginx/ssl/second_domain.pem;
ssl_certificate_key /etc/nginx/ssl/second_domain_key.pem;
}
It's called nothing special.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With