Repository navigation
Description
Firstly, I ran a successful certonly -d ... type run yesterday, and deployed that to https://sec.it.env.dtu.dk So, well done LetsEncrypt for that.
Today, with the release of 0.5.0 I wanted to re-try the --apache plugin, as it failed yesterday.
I'm running RHEL 7 with IPv6 as a virtual machine over a Windows HyperV installation (just to make stuff interesting ;).
$ uname -a
Linux vwww3.env.dtu.dk 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ httpd -V
Server version: Apache/2.4.6 (CentOS)
Server built: Nov 19 2015 21:43:13
Server's Module Magic Number: 20120211:24
Server loaded: APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
$ ./letsencrypt-auto --version
Checking for new version...
Requesting root privileges to run letsencrypt...
/root/.local/share/letsencrypt/bin/letsencrypt --version
letsencrypt 0.5.0
$ ./letsencrypt-auto --apache -d sec.it.env.dtu.dk
ncurses display .... No names were found in your configuration files.\nYou should specify ServerNames...
Config:
<VirtualHost 192.38.76.15:443 [2001:878:200:2000:0003::2]:443>
ServerAdmin webmaster@env.dtu.dk
DocumentRoot /var/www/html/sec.it.env.dtu.dk
ServerName sec.it.env.dtu.dk
ErrorLog logs/sec.it.env.dtu.dk-error_log
CustomLog logs/sec.it.env.dtu.dk-access_log common
DirectoryIndex index.html
#
# SSL Config
#
SSLEngine on
SSLHonorCipherOrder on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK"
SSLCertificateKeyFile /etc/letsencrypt/live/sec.it.env.dtu.dk/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/sec.it.env.dtu.dk/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/sec.it.env.dtu.dk/chain.pem
# HSTS
Header add Strict-Transport-Security "max-age=15768000"
<Directory /var/www/html/sec.it.env.dtu.dk>
AllowOverride none
Require all granted
Options +Indexes
As you can verify the site works, thus the config is fine. Apache 2.4.6 does not seem to need NameVirtualHost directives, and they are not in the config.
I dont have a problem as the cert isn't expiring soon, and the "certonly" method works fine and I can easily install them. But, it is funny that the client cant see this obvious virtual host. IPv6 ??
Thanks all for the LE efforts.
/Hugo
Activity
pde commentedon Apr 6, 2016
@joohoi want to take this?
pde commentedon Apr 6, 2016
@hugo-connery the fact that you have a
ServerNamedirective should be enough for this config to work, so I think this is definitely a bug...joohoi commentedon Apr 6, 2016
Yeah, I'll take this.
@hugo-connery thanks for extensive information about the environment! However if you could send us the output of:
python -c 'import platform;print([platform.system(),platform.linux_distribution()[0]])'
to make sure we end up using the correct system layout and defaults for your distribution (want to verify that we are actually searching correct paths for the vhosts)
hugo-connery commentedon Apr 6, 2016
Hi,
No problem. Will do. I appreciate the fast response.
Long live LE.
Hugo Connery
Head of IT, DTU Environment, http://www.env.dtu.dk
Reduce the risk of using IT by understanding it.
From: Joona Hoikkala [notifications@github.com]
Sent: Wednesday, 6 April 2016 19:46
To: letsencrypt/letsencrypt
Cc: Hugo Maxwell Connery
Subject: Re: [letsencrypt/letsencrypt] No vhost was selected (#2776)
Yeah, I'll take this. @hugo-conneryhttps://github.com/hugo-connery thanks for extensive information about the environment! However if you could send us the output of:
python -c 'import platform;print([platform.system(),platform.linux_distribution()[0]])'
to make sure we end up using the correct system layout and defaults for your distribution (want to verify that we are actually searching correct paths for the vhosts)
�
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/2776#issuecomment-206484850
hugo-connery commentedon Apr 6, 2016
Hi,
I'm not sure that this is going to help you much, but
['Linux', 'CentOS Linux']
is the output of the command you wished me to run.
I would think that this is a sub-set of the information
I already supplied.
Whatever.
Hugo Connery
Head of IT, DTU Environment, http://www.env.dtu.dk
Reduce the risk of using IT by understanding it.
From: Joona Hoikkala [notifications@github.com]
Sent: Wednesday, 6 April 2016 19:46
To: letsencrypt/letsencrypt
Cc: Hugo Maxwell Connery
Subject: Re: [letsencrypt/letsencrypt] No vhost was selected (#2776)
Yeah, I'll take this. @hugo-conneryhttps://github.com/hugo-connery thanks for extensive information about the environment! However if you could send us the output of:
python -c 'import platform;print([platform.system(),platform.linux_distribution()[0]])'
to make sure we end up using the correct system layout and defaults for your distribution (want to verify that we are actually searching correct paths for the vhosts)
�
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/2776#issuecomment-206484850
joohoi commentedon Apr 6, 2016
Yeah, it's just the actual calls we're using to get the distribution / os string, so wanted to make sure that it's detected correctly - just like it seems to be.
I confirmed that your VirtualHost configuration parses fine, so it must be something related to configuration layout / distribution defaults.
Does your virtualhost configuration file reside under /etc/httpd/conf.d and does the configuration file that holds the vhost have other vhosts in it?
bmw commentedon Apr 7, 2016
Perhaps another instance of this?
bret-miller commentedon Apr 7, 2016
In case it is, here is some information:
Letsencrypt says:
/etc/apache2/sites-available/cbmission.org.conf says at the top:
and later:
python -c 'import platform;print([platform.system(),platform.linux_distribution()[0]])' says:
['Linux', 'Ubuntu']Note that this configuration was working perfectly until I updated to client version 0.5.0 today. Now I have to manually edit the apache config files after letsencrypt issues the certificate.
Let me know if there's other information that would be helpful.
thorstensiefert commentedon Apr 7, 2016
Got the same issue with two vhosts which where perfectly configured before - and destroyed after the renewal process.
joohoi commentedon Apr 9, 2016
@bret-miller & @thorstensiefert & @hugo-connery : could you post the contents of LE log file to a pastebin in case it has some more information on this. The file in question is /var/log/letsencrypt/letsencrypt.log
bret-miller commentedon Apr 11, 2016
I did several domains on Friday. Here's the log from then:
http://pastebin.com/tZtV9eks
joohoi commentedon Apr 11, 2016
@bret-miller The log file doesn't seem to have a reference to the failed run you reported earlier, or did the run(s) on the log also result into similarily broken config files? If not, could you check /var/log/letsencrypt/letsencrypt.log.1 letsencrypt.log.2 and so on, for the one that has the information on the run with domain www.cbmission.org
22 remaining items
shaneonabike commentedon Apr 14, 2016
Or better yet put that into the help documentation of the command-line tool
thorstensiefert commentedon Apr 14, 2016
I'll give it a try.
Thx
hugo-connery commentedon Apr 15, 2016
Hi,
Much improvement. The cert was renewed and installed and configured.
It complained about:
Unable to add title
IMPORTANT NOTES:
however, we successfully installed your certificate.
/etc/letsencrypt/live/sec.it.env.dtu.dk/fullchain.pem. Your cert
will expire on 2016-07-14. To obtain a new version of the
certificate in the future, simply run Let's Encrypt again.
And the certificate configuration lines do not use either
chain.pem or fullchain.pem (which is not a problem, but I
note these things).
Cheers, Hugo
thorstensiefert commentedon Apr 16, 2016
@joohoi I tried (#2776 (comment)) and it works fine for me.
Thx!
hugo-connery commentedon Apr 16, 2016
Where to put the documentation?
I suggest a page at letsencrypt.org which talks about the recommended structure for vhost definitions under /etc/httpd/conf.d/
That page, which should show a minimal server config with two sites, can be linked to from the getting started page in the section where it discusses Apache.
Secondly, it can be issued as an information message if someone uses letsencrypt-auto --apache.
i.e "Please use our recommended configuration layout for virtual hosts for better results: https://letsencrypt.org/apache-vhost-config.html"
or equivalent.
Thanks to all who have contributed to the thread. I'm happy to have a working model which I can then use for all my other sites and servers :)
/Hugo
joohoi commentedon Apr 16, 2016
@thorstensiefert awesome!
@hugo-connery I think that the correct place would actually be a notification that the client emits when it stumbles across a vhost file with more than one VirtualHost definition. I'll create a new issue for that, because this issue is too long to quickly get a glimpse of what's going on.
Another thing: that message "Unable to add title" is emitted by reverter, which handles config rollbacks, and it basically gets printed when the reverer is unable to add a checkpoint for a file. Might be worthwhile to investigate further, if on the next run it still gets displayed, but I wouldn't worry for it as of now.
joohoi commentedon Apr 16, 2016
Reason: User has multiple VirtualHost configurations per file. 0.5.0 enforces stricter rules on vhost configuration, so the client is unable to find correct VirtualHost configurations.
Solution: Split VirtualHost configurations to one vhost per file.
I think this issue is pretty much solved. @hugo-connery I think you can close this for now, and open a new one for the reverter error if you stumble upon it again, it's outside of the scope of this issue.
hugo-connery commentedon Apr 16, 2016
Yes. Issue is closed.
Source of problem (multiple vhosts in a config file) identified and fixing this fixes the problem.
/Hugo
Gn13l commentedon Apr 29, 2016
I also had the same issue with the same resolution. My HTTP and HTTPS vhosts were defined in the same config file. Separating them solved the issue.
timbru31 commentedon Apr 29, 2016
I've experienced the same issue and was very sad to see that the support for multiple vhosts per config file was removed - and even worse no correct error message was displayed :(
My config files were working fine for years and personally I prefer multiple vhosts per config.
zertrin commentedon May 1, 2016
Everything was working fine with multiple VHosts per config file provided that they weren't for the same port (i.e. VHost:80 and VHost:443 in the same config file was ok, whereas Vhost:443 + VHost:443 was not supported).
And now this doesn't work anymore? Why?
That's quite a PITA since I have a long list of conf files for each subdomain which combines the VHost 80 and the VHost 443 and now I have to split all of them in two...
I know that multiple HTTPS VHosts per file was never supported, but one HTTPS VHost + the HTTP one did work fine before. And now it's not supported anymore apparently? To me that looks like a regression...
zertrin commentedon May 1, 2016
In case it may be useful to someone else, I've used a small bash script to help me split my numerous config files:
It uses the
csplitprogram (in the coreutils package in Debian jessie for example) to find a pattern where the file is to be split.Depending on your config files, the pattern can be
/^<VirtualHost \*:443>$/or/^<IfModule mod_ssl\.c>$/or something else. (adapt the csplit line in the script accordingly)The convention assumed here is that:
mysite.conf./split_vhosts.sh mysitemysite-80.confandmysite-443.conf(assuming the first VHost in the original config file was for port 80 and the second for port 443)a2dissite mysite.confto deactivate the original conf filea2ensitefor each of the split files.Now it's still your job to check that the resulting files are correct and to reload apache. The original config files are not deleted, you may want to do it manually once you've made sure everything works.
pde commentedon May 12, 2016
The fix for this shipped today. Please open a new ticket if you're seeing this problem in Certbot 0.6.0!