| From | Sent On | Attachments |
|---|---|---|
| Jonathan Garvin | May 11, 2009 4:56 pm | |
| Igor Sysoev | May 11, 2009 10:47 pm | |
| Jon Garvin | May 12, 2009 7:54 am | |
| Igor Sysoev | May 12, 2009 7:58 am | |
| Jon Garvin | May 12, 2009 8:44 am | |
| Igor Sysoev | May 12, 2009 8:49 am |
| Subject: | setup multiple SSL servers in one config | |
|---|---|---|
| From: | Jonathan Garvin (jgar...@wwidea.org) | |
| Date: | May 11, 2009 4:56:47 pm | |
| List: | ru.sysoev.nginx | |
I'm in the process of trying to convert a Pound config file that manages multiple SSL sites over to Nginx. If I just have one site setup in the nginx.conf file then everything, including the SSL, works fine. But if I add a second server block for a different domain, then the second tries to use the SSL certificate for the first, resulting in the browser raising security warnings. My conf file is below. Any hints at what I am doing wrong would be greatly appreciated.
-----------------------------------
user wwidea; worker_processes 1;
events { worker_connections 1024; }
http { include mime.types; default_type application/octet-stream; passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.2; passenger_ruby /usr/local/bin/ruby; passenger_max_pool_size 20; passenger_pool_idle_time 3600;
sendfile on; gzip on; keepalive_timeout 65;
server { listen 443; server_name www.domain1.com; root /var/rails/domain1/current/public;
ssl on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; proxy_max_temp_file_size 0; ssl_certificate /var/ssl-certs/domain1.cert; ssl_certificate_key /var/ssl-certs/domain1.key; index index.html index.htm; passenger_enabled on; }
server { listen 443; server_name www.domain2.com; root /var/rails/domain2/current/public;
ssl on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; proxy_max_temp_file_size 0; ssl_certificate /var/ssl-certs/domain2.cert; ssl_certificate_key /var/ssl-certs/domain2.key; index index.html index.htm; passenger_enabled on; } }





