{"id":9,"date":"2005-02-04T13:25:05","date_gmt":"2005-02-04T13:25:05","guid":{"rendered":"http:\/\/bingo.bananasplit.info\/wordpress\/?p=9"},"modified":"2005-02-04T14:25:50","modified_gmt":"2005-02-04T14:25:50","slug":"apache2-ssl-on-debian","status":"publish","type":"post","link":"https:\/\/blog.stmellion.org\/?p=9","title":{"rendered":"Apache2 SSL on Debian"},"content":{"rendered":"<p>Thankfully I got considerable help on this subject.  I followed some excellent <a href=\"http:\/\/www.ilovett.com\/blog\/archives\/2004\/10\/21\/installing-ssl-on-debian-apache2\/\">instructions<\/a>  posted by Bill Lovett.  These alone didn&#8217;t solve all my issues but fortunately the ever-knowing Weasel came to my rescue.<\/p>\n<p>Starting at the beginning:<br \/>\nGet apache2 running!  No point buggering around with ssl configuration if the webserver doesn&#8217;t work.  Once that&#8217;s done, proceed.<\/p>\n<p>There is the usual requirement to generate certificates, assuming a common certificate authority is desired across a number of services.  Save the cert and the cacert into \/etc\/apache2\/ssl  (I copied the private key from the cert request into the certificate file, just for simplicity).  This step can be bypassed by running &#8216;apache2-ssl-certificate&#8217; which will generate a cert file.  I just prefer to make my own.<\/p>\n<p>Copy \/usr\/share\/doc\/apache2\/examples\/ssl.conf.gz to \/etc\/apache2\/sites-available and unzip it.<br \/>\nRun &#8216;a2ensite ssl.conf&#8217; to create a symlink in sites-enabled to the file in sites-available.<br \/>\nRun &#8216;a2enmod ssl&#8217; to enable the module in the same manner as the site.<br \/>\nEdit \/etc\/apache2\/sites-available\/ssl.conf and configure it to look at the certs and cacerts.  Also make sure the Document Root is set correctly to \/var\/www<\/p>\n<p>Now comes a nasty bit:<br \/>\nYou cannot mix wildcards to Virtual Hosts with non-wildcards.  Some would say you shouldn&#8217;t have <u>any<\/u> wildcards.  By this I mean in each configuration file in \/etc\/apache2\/sites-available, you don&#8217;t want anything like these:<br \/>\n&lt;VirtualHost *&gt;<br \/>\n&lt;Virtualhost *:443&gt;<br \/>\nNameVirtualHost *:80<\/p>\n<p>Easiest way to find these things is with the following commands:<br \/>\ngrep -ri &#8216;&lt;VirtualHost &#8216; \/etc\/apache2<br \/>\ngrep -ri &#8216;&lt;NameVirtual&#8217; \/etc\/apache2<\/p>\n<p>Tighten these down by changing them to:<br \/>\n&lt;VirtualHost 1.2.3.4:80&gt;<br \/>\nNameVirtualHost 1.2.3.4:80<br \/>\nWhere 1.2.3.4 is the servers&#8217; IP Address.<\/p>\n<p>Restart apache2 by \/etc\/init.d\/apache2 restart<br \/>\nLogs can be found in \/var\/log\/apache2.  Note that ssl logs are have an underscore, whilst non-ssl have a period.  Eg. error.log and error_log<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to configure Apache2 on Debain with support for SSL.  In other words, how to serve https.<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-debian","entry"],"_links":{"self":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":0,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}