{"action":"created","issue":{"url":"https://api.github.com/repos/sjau/le2ispc/issues/4","labels_url":"https://api.github.com/repos/sjau/le2ispc/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/sjau/le2ispc/issues/4/comments","events_url":"https://api.github.com/repos/sjau/le2ispc/issues/4/events","html_url":"https://github.com/sjau/le2ispc/issues/4","id":120537689,"number":4,"title":"Folder does not exists","user":{"login":"enake","id":6717006,"avatar_url":"https://avatars.githubusercontent.com/u/6717006?v=3","gravatar_id":"","url":"https://api.github.com/users/enake","html_url":"https://github.com/enake","followers_url":"https://api.github.com/users/enake/followers","following_url":"https://api.github.com/users/enake/following{/other_user}","gists_url":"https://api.github.com/users/enake/gists{/gist_id}","starred_url":"https://api.github.com/users/enake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enake/subscriptions","organizations_url":"https://api.github.com/users/enake/orgs","repos_url":"https://api.github.com/users/enake/repos","events_url":"https://api.github.com/users/enake/events{/privacy}","received_events_url":"https://api.github.com/users/enake/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-05T07:20:58Z","updated_at":"2015-12-07T17:20:18Z","closed_at":null,"body":"On my configuration, folder\r\n/etc/apache2/conf-available does not exists so the script exits with\r\nPHP Warning:  fopen(/etc/apache2/conf-available/letsencrypt-webroot.conf): failed to open stream: No such file or directory in /root/le2ispc on line 112\r\nUnable to open file!\r\n"},"comment":{"url":"https://api.github.com/repos/sjau/le2ispc/issues/comments/162598169","html_url":"https://github.com/sjau/le2ispc/issues/4#issuecomment-162598169","issue_url":"https://api.github.com/repos/sjau/le2ispc/issues/4","id":162598169,"user":{"login":"wzurborg","id":1320950,"avatar_url":"https://avatars.githubusercontent.com/u/1320950?v=3","gravatar_id":"","url":"https://api.github.com/users/wzurborg","html_url":"https://github.com/wzurborg","followers_url":"https://api.github.com/users/wzurborg/followers","following_url":"https://api.github.com/users/wzurborg/following{/other_user}","gists_url":"https://api.github.com/users/wzurborg/gists{/gist_id}","starred_url":"https://api.github.com/users/wzurborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wzurborg/subscriptions","organizations_url":"https://api.github.com/users/wzurborg/orgs","repos_url":"https://api.github.com/users/wzurborg/repos","events_url":"https://api.github.com/users/wzurborg/events{/privacy}","received_events_url":"https://api.github.com/users/wzurborg/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T17:20:18Z","updated_at":"2015-12-07T17:20:18Z","body":"I have switched to option 1 now, but this only works for Apache 2.4.8 and later. The strategy is to specify a common webroot for all domains and to rewrite the ACME challenge request to that location. My config file _/etc/apache2/conf-available/letsencrypt.conf_ now looks as follows:\r\n```\r\n<IfModule mod_headers.c>\r\n    <LocationMatch \"/.well-known/acme-challenge/*\">\r\n        Header set Content-Type \"text/plain\"\r\n    </LocationMatch>\r\n</IfModule>\r\n\r\n# Rewrite LetsEncrypt challenge request\r\nRewriteEngine on\r\nRewriteRule (\\.well-known/acme-challenge/.*)$ /var/www/$1 [L]\r\nRewriteOptions InheritDownBefore\r\n```\r\n\r\n**This works for Apache 2.4.8 and greater only!**\r\n\r\nAdvantages:\r\n\r\n* It works independent of any further redirections in _.htaccess_ or wherever. No need to save and restore _.htaccess_.\r\n* No need to extract the webroot from the ISPConfig DB, the _--webroot-path_ argument is fixed to _/var/www_.\r\n\r\nI do not want to overwrite your script, so I will commit this to my own repo only. Will take some time though.\r\n"}}