I've been trying to get a Let's Encrypt certificate, key and chain to work.But I have also done some stuff that I know I didn't need to before I realized what to do.Port 443 wasn't open so I've also been doing some stuff with ports.conf but I've changed that back to how it was, I think.I modified the default-ssl.conf and did an a2ensite but the normal mywebsite.com.conf was still active.There was an error in the file path to the keys, so I fixed that and tried to reboot apache2 but that's when the real problems started.I tried a2dissite on one and both conf files (normal and SSL) but couldn't get apache to restart.The only other thing was I did some thing I didn't need to like making a CSR and adding it to the certificate file.Here's what it was saying: apache2.service - LSB: Apache2 web serverLoaded: loaded (/etc/init.d/apache2)Drop-In: /lib/systemd/system/apache2.service.dforking.confActive: failed (Result: exit-code) since Wed 2017-01-18 06:23:59 PST; 3min 31s agoProcess: 31878 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)Process: 31861 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)Process: 30542 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)Jan 18 06:22:10 archimedes systemd[1]: apache2.service: control process exited, code=exited status=1Jan 18 06:22:10 archimedes systemd[1]: Reload failed for LSB: Apache2 web server.Jan 18 06:23:37 archimedes systemd[1]: Reloading LSB: Apache2 web server.Jan 18 06:23:38 archimedes apache2[31861]: Reloading web server: apache2 failed!Jan 18 06:23:38 archimedes apache2[31861]: Apache2 is not running ... (warning).Jan 18 06:23:38 archimedes systemd[1]: apache2.service: control process exited, code=exited status=1Jan 18 06:23:38 archimedes systemd[1]: Reload failed for LSB: Apache2 web server.Jan 18 06:23:59 archimedes apache2[31878]: Stopping web server: apache2.Jan 18 06:23:59 archimedes systemd[1]: Unit apache2.service entered failed state. Jan 18 06:27:04 archimedes systemd[1]: Unit apache2.service cannot be reloaded because it is inactive.Then I had a look at another thread from here and someone mentioned sudo reboot so I tried this and putty froze. But when I re-opened putty I was able to restart apache2 and it's back to normal HTTP now.Any ideas what I did wrong?Is going in and adding the SSL to sites-enabled again a good thing to do? It seems that port 443 is open now, which is a good thing.EDIT:apache2.conf...Mutex file:${APACHE_LOCK_DIR} defaultPidFile ${APACHE_PID_FILE}Timeout 300KeepAlive OffMaxKeepAliveRequests 100KeepAliveTimeout 5User ${APACHE_RUN_USER}Group ${APACHE_RUN_GROUP}HostnameLookups OffErrorLog ${APACHE_LOG_DIR}/error.logLogLevel warnIncludeOptional mods-enabled/*.loadIncludeOptional mods-enabled/*.confInclude ports.conf<Directory />    Options FollowSymLinks    AllowOverride None    Require all denied</Directory><Directory /usr/share>    AllowOverride None    Require all granted</Directory><Directory /var/www/>    Options Indexes FollowSymLinks    AllowOverride None    Require all granted</Directory>and, mywebsite.com.conf...<VirtualHost *:80>    ServerAdmin webmaster@mywebsite.com    ServerName mywebsite.com    ServerAlias www.mywebsite.com    DocumentRoot /var/www/html    ErrorLog /var/www/logs/error.log    CustomLog /var/www/logs/access.log combined    <Directory /var/www/html/>            Options Indexes FollowSymLinks MultiViews            AllowOverride all            Order allow,deny            allow from all    </Directory></VirtualHost>
Apache problems when trying to set up SSL (Debian)
debian;apache virtualhost;letsencrypt
Make sure to allow ports 80 and 443 in your router.Make sure to forward ports 80 and 443 to your server.Make sure to have punched holes in your firewall:sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPTsudo iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPTDefine VirtualHost for port 443 (as well as for 80):<VirtualHost *:80>... your code here ...</VirtualHost><IfModule mod_ssl.c>  <VirtualHost *:443>  ... your code here ...  </VirtualHost></IfModule>Activate mod_rewrite:sudo a2enmod rewriteDefine a redirect from HTTP to HTTPS, something like:RewriteCond            %{HTTPS} !onRewriteRule            ^/?(.*) https://%{SERVER_NAME}/$1 [R=301]And finally restart Apache:sudo service apache2 restart