capistrano-plugins / capistrano-unicorn-nginx

Capistrano tasks for automatic and sensible unicorn + nginx configuration
MIT License
175 stars 81 forks source link

Include server_name in SSL server config #29

Closed dspeake closed 10 years ago

dspeake commented 10 years ago

Without this, the non-SSL request defaults to the first nginx/vhost configuration with "listen:80"

rhomeister commented 10 years ago

In the interest of knowledge capture about this issue for later reference, do you have a link to unicorn documentation about this?

rhomeister commented 10 years ago

@bruno- I think this merge is safe. It simply adds the server_name directive that was already present for the default server block: https://github.com/capistrano-plugins/capistrano-unicorn-nginx/blob/master/lib/generators/capistrano/unicorn_nginx/templates/nginx_conf.erb#L34

dspeake commented 10 years ago

@rhomeister I was about to make the same comment; seeing as the server_name directive is declared in the same way in the default block, I assumed it was safe to do so in the SSL block too. The code has been tested as well.

bruno- commented 10 years ago

I'm not an nginx config file expert but this does look ok. Merging since @rhomeister also confirmed.

bruno- commented 10 years ago

Also pushed new gem version 3.1.1.