{"action":"created","issue":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/106","labels_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/106/comments","events_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/106/events","html_url":"https://github.com/jwilder/nginx-proxy/pull/106","id":58511489,"number":106,"title":"Per VIRTUAL_HOST configuration files","user":{"login":"md5","id":76367,"avatar_url":"https://avatars.githubusercontent.com/u/76367?v=3","gravatar_id":"","url":"https://api.github.com/users/md5","html_url":"https://github.com/md5","followers_url":"https://api.github.com/users/md5/followers","following_url":"https://api.github.com/users/md5/following{/other_user}","gists_url":"https://api.github.com/users/md5/gists{/gist_id}","starred_url":"https://api.github.com/users/md5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/md5/subscriptions","organizations_url":"https://api.github.com/users/md5/orgs","repos_url":"https://api.github.com/users/md5/repos","events_url":"https://api.github.com/users/md5/events{/privacy}","received_events_url":"https://api.github.com/users/md5/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-22T17:58:30Z","updated_at":"2015-02-22T23:56:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/pulls/106","html_url":"https://github.com/jwilder/nginx-proxy/pull/106","diff_url":"https://github.com/jwilder/nginx-proxy/pull/106.diff","patch_url":"https://github.com/jwilder/nginx-proxy/pull/106.patch"},"body":"This PR adds the ability to configuration Nginx settings on a per `VIRTUAL_HOST` basis by adding a configuration file under `/etc/nginx/vhost.d`. As in the case of SSL configuration and basic authentication, the files in this directory are expected to be named after the `VIRTUAL_HOST` value verbatim (without `.conf`).\r\n\r\nI also added some documentation around providing custom Nginx configuration on a proxy-wide basis. The whole README.md is starting to feel pretty messy to me, so it may make sense at some point to do an editing pass on it as a whole or to move large parts of it into wiki pages.\r\n\r\nFixes #29, #36, #39, #70, #76, #87 \r\nRelated #71 "},"comment":{"url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/comments/75473692","html_url":"https://github.com/jwilder/nginx-proxy/pull/106#issuecomment-75473692","issue_url":"https://api.github.com/repos/jwilder/nginx-proxy/issues/106","id":75473692,"user":{"login":"jwilder","id":219935,"avatar_url":"https://avatars.githubusercontent.com/u/219935?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilder","html_url":"https://github.com/jwilder","followers_url":"https://api.github.com/users/jwilder/followers","following_url":"https://api.github.com/users/jwilder/following{/other_user}","gists_url":"https://api.github.com/users/jwilder/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilder/subscriptions","organizations_url":"https://api.github.com/users/jwilder/orgs","repos_url":"https://api.github.com/users/jwilder/repos","events_url":"https://api.github.com/users/jwilder/events{/privacy}","received_events_url":"https://api.github.com/users/jwilder/received_events","type":"User","site_admin":false},"created_at":"2015-02-22T23:56:14Z","updated_at":"2015-02-22T23:56:14Z","body":"Good points.  \r\n\r\nNot everything is overideable with this approach I think.  I don't think you could override the `location / {}` block with the include.  I believe nginx will complain about about duplicate entries.  I know there have been some requests for virtual path support so that still needs some other hooks to resolve.\r\n\r\nThe include is for both SSL and non-SSL.  I'm not sure if it matters but adding SSL options would get included in the non-SSL block.  Maybe that can be handled w/ having a `.ssl` suffix to the vhost file and `nginx.tmpl` would look for that and fallback to the main one if it doesn't exist?   Or perhaps add two separate includes?\r\n\r\nThere's been other requests to not redirect http->https.  Not sure if an include could resolve that issue.  \r\n\r\nI still think being able to generate the server block is useful.  It could actually be a separate feature independent of this.  The majority of the cases could be handled w/ this PR and anything not covered could be handled w/ a custom vhost template.  Maybe a naming conventions like: `example.com.tmpl`.  If that exists, use that for the server block.  This would be the advanced/you need to understand go templates option but should negate the need to fork and maintain a custom image."}}