{"action":"created","issue":{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/631","labels_url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/631/labels{/name}","comments_url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/631/comments","events_url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/631/events","html_url":"https://github.com/letsencrypt/letsencrypt/pull/631","id":97183329,"number":631,"title":"Apache Overhaul","user":{"login":"jdkasten","id":1581662,"avatar_url":"https://avatars.githubusercontent.com/u/1581662?v=3","gravatar_id":"","url":"https://api.github.com/users/jdkasten","html_url":"https://github.com/jdkasten","followers_url":"https://api.github.com/users/jdkasten/followers","following_url":"https://api.github.com/users/jdkasten/following{/other_user}","gists_url":"https://api.github.com/users/jdkasten/gists{/gist_id}","starred_url":"https://api.github.com/users/jdkasten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdkasten/subscriptions","organizations_url":"https://api.github.com/users/jdkasten/orgs","repos_url":"https://api.github.com/users/jdkasten/repos","events_url":"https://api.github.com/users/jdkasten/events{/privacy}","received_events_url":"https://api.github.com/users/jdkasten/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-25T02:29:19Z","updated_at":"2015-07-30T21:21:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/pulls/631","html_url":"https://github.com/letsencrypt/letsencrypt/pull/631","diff_url":"https://github.com/letsencrypt/letsencrypt/pull/631.diff","patch_url":"https://github.com/letsencrypt/letsencrypt/pull/631.patch"},"body":"Sorry for the size of this PR, but it fixes most of the issues within Apache and raises test coverage to 100% for the Apache plugin.\r\nFixes #571 #603 #479 #394 and implements #17\r\n\r\nIn addition to the above issues... Here are some of the larger changes..\r\nParsing now incorporates current plugins and variable declarations and correctly applies them to IfModule and IfDefine directives.\r\n\r\nApache variables are interpreted correctly.\r\n\r\nApache works cleanly on the Debian default installation.\r\n\r\nBetter error handling in general.\r\n\r\nKnown list of things still left to do.\r\n1.  Support ports other than 443 for https\r\n2.  Support other Apache layouts (non-debian)\r\n3.  Include IfModule <rewrite_module> around rewrite directives.\r\n4.  Smarter auto-selection for vhosts.  It will prompt you if you have more than one non-default addressed VirtualHost.  (The command now runs seamlessly on the default Apache configuration)"},"comment":{"url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/comments/126493574","html_url":"https://github.com/letsencrypt/letsencrypt/pull/631#issuecomment-126493574","issue_url":"https://api.github.com/repos/letsencrypt/letsencrypt/issues/631","id":126493574,"user":{"login":"kuba","id":106176,"avatar_url":"https://avatars.githubusercontent.com/u/106176?v=3","gravatar_id":"","url":"https://api.github.com/users/kuba","html_url":"https://github.com/kuba","followers_url":"https://api.github.com/users/kuba/followers","following_url":"https://api.github.com/users/kuba/following{/other_user}","gists_url":"https://api.github.com/users/kuba/gists{/gist_id}","starred_url":"https://api.github.com/users/kuba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuba/subscriptions","organizations_url":"https://api.github.com/users/kuba/orgs","repos_url":"https://api.github.com/users/kuba/repos","events_url":"https://api.github.com/users/kuba/events{/privacy}","received_events_url":"https://api.github.com/users/kuba/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T21:21:11Z","updated_at":"2015-07-30T21:21:11Z","body":"Sorry, my testing scripts were `rm -rf /etc/letsencrypt /var/lib/letsencrypt /var/log/letsencrypt` on each invocation... This included removal of `/etc/options-ssl.conf` included from Apache scripts. Maybe we should store this file in `/etc/apache` instead?\r\n\r\nThat being said, without the `rm -rf` second run fails for me at:\r\n\r\n```\r\n2015-07-30 17:16:23,950:WARNING:letsencrypt_apache.configurator:Cannot find a cert or key directive in /files/etc/apache2/sites-available/000-default.conf/VirtualHost. VirtualHost was not modified\r\n2015-07-30 17:16:23,952:DEBUG:letsencrypt.cli:Exiting abnormally:\r\nTraceback (most recent call last):\r\n  File \"/root/letsencrypt/venv/bin/letsencrypt\", line 9, in <module>\r\n    load_entry_point('letsencrypt==0.1', 'console_scripts', 'letsencrypt')()\r\n  File \"/root/letsencrypt/letsencrypt/cli.py\", line 778, in main\r\n    return args.func(args, config, plugins)\r\n  File \"/root/letsencrypt/letsencrypt/cli.py\", line 191, in run\r\n    domains, lineage.privkey, lineage.cert, lineage.chain)\r\n  File \"/root/letsencrypt/letsencrypt/client.py\", line 375, in deploy_certificate\r\n    os.path.abspath(privkey_path), chain_path)\r\n  File \"/root/letsencrypt/letsencrypt-apache/letsencrypt_apache/configurator.py\", line 199, in deploy_cert\r\n    \"Unable to find cert and/or key directives\")\r\nPluginError: Unable to find cert and/or key directives\r\n\r\nTraceback (most recent call last):\r\n  File \"/root/letsencrypt/venv/bin/letsencrypt\", line 9, in <module>\r\n    load_entry_point('letsencrypt==0.1', 'console_scripts', 'letsencrypt')()\r\n  File \"/root/letsencrypt/letsencrypt/cli.py\", line 778, in main\r\n    return args.func(args, config, plugins)\r\n  File \"/root/letsencrypt/letsencrypt/cli.py\", line 191, in run\r\n    domains, lineage.privkey, lineage.cert, lineage.chain)\r\n  File \"/root/letsencrypt/letsencrypt/client.py\", line 375, in deploy_certificate\r\n    os.path.abspath(privkey_path), chain_path)\r\n  File \"/root/letsencrypt/letsencrypt-apache/letsencrypt_apache/configurator.py\", line 199, in deploy_cert\r\n    \"Unable to find cert and/or key directives\")\r\nPluginError: Unable to find cert and/or key directives\r\n```\r\n\r\nI picked the first available vhost:\r\n\r\n```\r\n-------------------------------------------------------------------------------\r\n1: 000-default.conf               |                       |       | Enabled\r\n2: default-ssl.conf               |                       | HTTPS |\r\n3: 000-default-le-ssl.conf        |                       | HTTPS | Enabled\r\n-------------------------------------------------------------------------------\r\n```\r\n\r\nEverything is run as root.\r\n\r\n By the way, is it possible to choose the vhost using flags instead of interactive input?"}}