{"action":"created","issue":{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/1831","labels_url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/1831/labels{/name}","comments_url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/1831/comments","events_url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/1831/events","html_url":"https://github.com/letsencrypt/letsencrypt/pull/1831","id":121007026,"number":1831,"title":"Apache configurator respects Listen ip:port statements","user":{"login":"watercrossing","id":5656196,"avatar_url":"https://avatars.githubusercontent.com/u/5656196?v=3","gravatar_id":"","url":"https://api.github.com/users/watercrossing","html_url":"https://github.com/watercrossing","followers_url":"https://api.github.com/users/watercrossing/followers","following_url":"https://api.github.com/users/watercrossing/following{/other_user}","gists_url":"https://api.github.com/users/watercrossing/gists{/gist_id}","starred_url":"https://api.github.com/users/watercrossing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watercrossing/subscriptions","organizations_url":"https://api.github.com/users/watercrossing/orgs","repos_url":"https://api.github.com/users/watercrossing/repos","events_url":"https://api.github.com/users/watercrossing/events{/privacy}","received_events_url":"https://api.github.com/users/watercrossing/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/labels/apache","name":"apache","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-08T13:33:50Z","updated_at":"2015-12-08T17:36:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/pulls/1831","html_url":"https://github.com/letsencrypt/letsencrypt/pull/1831","diff_url":"https://github.com/letsencrypt/letsencrypt/pull/1831.diff","patch_url":"https://github.com/letsencrypt/letsencrypt/pull/1831.patch"},"body":"Fixes #1739. \r\n\r\nThe current `prepare_server_https` method fails if Apache is set up to bind to specific IPs only. It believes that there is no `Listen` statement at all, and adds a generic `Listen 443`. If a specific `Listen 127.0.0.1:443` already exists, apache fails to start up as it tries to bind to an already occupied port. (`/var/log/apache2/error.log`: `Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443`. \r\n\r\nThe fix in this pull requests now iterates through all Listen statements, and checks if they are on the correct port and if not, adds the appropriate Listen statement. Its not perfect yet, as it creates a new Listen statement for every listen statement which is not the target ssl port, no matter if a vhost for which we want to create a certificate actually needs this IP. But this is quite the edge case and I can't think of a neat way of integrating this restriction.\r\n\r\nI have added some additional tests which give full coverage. "},"comment":{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/comments/162955708","html_url":"https://github.com/letsencrypt/letsencrypt/pull/1831#issuecomment-162955708","issue_url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/1831","id":162955708,"user":{"login":"joohoi","id":5235109,"avatar_url":"https://avatars.githubusercontent.com/u/5235109?v=3","gravatar_id":"","url":"https://api.github.com/users/joohoi","html_url":"https://github.com/joohoi","followers_url":"https://api.github.com/users/joohoi/followers","following_url":"https://api.github.com/users/joohoi/following{/other_user}","gists_url":"https://api.github.com/users/joohoi/gists{/gist_id}","starred_url":"https://api.github.com/users/joohoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joohoi/subscriptions","organizations_url":"https://api.github.com/users/joohoi/orgs","repos_url":"https://api.github.com/users/joohoi/repos","events_url":"https://api.github.com/users/joohoi/events{/privacy}","received_events_url":"https://api.github.com/users/joohoi/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T17:36:50Z","updated_at":"2015-12-08T17:36:50Z","body":"Needs some pep8 - love"}}