Using Centos 7
Server version: Apache/2.4.6 (CentOS)
My website got taken down and apache can't start. I've had issues reading the logs due to permissions stuff that seems to have solved itself after reinstall (apache not being able to read its own log files) but, after reinstalling and reinstating the conf files (leaving lets encrypt and it certificates) I have this issue:
This website worked fine for a couple weeks. When trying to run certbot again after apache giving issues, or just running "apachectl configtest" this is what I see:
Invalid command '<VirtuallHost', perhaps misspelled or defined by a module not included in the server configuration
This appears to have been generated by letsencrypt.
<VirtualHost *:80>
ServerName egletech.net
DocumentRoot /var/www/html
ServerAlias www.egletech.net
ErrorLog /var/www/error.log
CustomLog /var/www/requests.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =egletech.net [OR]
RewriteCond %{SERVER_NAME} =www.egletech.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Include /etc/httpd/conf/httpd-le-ssl.conf
The included conf:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName egletech.net
DocumentRoot /var/www/html
ServerAlias www.egletech.net
ErrorLog /var/www/error.log
CustomLog /var/www/requests.log combined
SSLCertificateFile /etc/letsencrypt/live/www.egletech.net/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.egletech.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/www.egletech.net/chain.pem
</VirtualHost>
</IfModule>
My domain is egletech.net,
Removing both virtualhosts seems to be the only way to get apache to start, so there seems to be an issue with it. It's interesting the site was live and had connectivity with the same config (i never changed anything) for the last two weeks.
The version of my client is certbot 1.11.0
For what it's worth, I used lets encrypt a couple years ago for a wordpress site and don't recall apache ever breaking or having to mess with all this. That site no longer is online though, nor is the server, to look at.
Thanks for the help!