{"id":2592,"date":"2019-06-30T15:06:35","date_gmt":"2019-06-30T19:06:35","guid":{"rendered":"http:\/\/ninecrows.com\/career\/?page_id=2592"},"modified":"2019-06-30T15:06:35","modified_gmt":"2019-06-30T19:06:35","slug":"create-a-self-signed-certificate","status":"publish","type":"page","link":"https:\/\/ninecrows.com\/career\/create-a-self-signed-certificate\/","title":{"rendered":"Create a Self Signed Certificate"},"content":{"rendered":"\n<p>Looking as if I&#8217;ll be using some self-signed certs for development purposes (and perhaps for some online game work) so I&#8217;m going to write up the process to keep it readily accessible here.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><code>sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout \/etc\/ssl\/private\/apache-selfsigned.key -out \/etc\/ssl\/certs\/apache-selfsigned.crt <\/code><\/strong><\/li><li>In <strong><code> \/etc\/apache2\/conf-available<\/code><\/strong>  create  <code><strong>ssl-params.conf <\/strong><\/code><br>use<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH\nSSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1\nSSLHonorCipherOrder On\n# Disable preloading HSTS for now.  You can use the commented out header line that includes\n# the \"preload\" directive if you understand the implications.\n# Header always set Strict-Transport-Security \"max-age=63072000; includeSubDomains; preload\"\nHeader always set X-Frame-Options DENY\nHeader always set X-Content-Type-Options nosniff\n# Requires Apache >= 2.4\nSSLCompression off\nSSLUseStapling on\nSSLStaplingCache \"shmcb:logs\/stapling-cache(150000)\"\n# Requires Apache >= 2.4.11\nSSLSessionTickets Off<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li><br><strong><code>sudo cp \/etc\/apache2\/sites-available\/default-ssl.conf \/etc\/apache2\/sites-available\/default-ssl.conf.bak <\/code><\/strong><\/li><li><strong><code> sudo emacs \/etc\/apache2\/sites-available\/default-ssl.conf <\/code><\/strong><\/li><li>Edited  <strong><code>\/etc\/apache2\/sites-available\/default-ssl.conf<\/code><\/strong>  to enable the new cert and to update <strong><code>ServerAdmin <\/code><\/strong>and add <strong><code>ServerName<\/code><\/strong><\/li><li>Did not set redirect at  <br><strong><code>\/etc\/apache2\/sites-available\/000-default.conf  <\/code><\/strong><br>as I expect this dev machine to respond to either http or https requests.<\/li><li>Firewall checks and updates:<br><strong><code>sudo ufw app list <br>sudo ufw status<br>sudo ufw allow 'Apache Full'<br>sudo ufw enable<\/code><\/strong><\/li><li>Enable appropriate apache modules<br>sudo a2enmod ssl<br>sudo a2enmod headers<\/li><li>and perhaps virtual hosts<br>sudo a2ensite default-ssl<br>sudo a2enconf ssl-params<br>sudo apache2ctl configtest<br>sudo systemctl restart apache2<br><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Looking as if I&#8217;ll be using some self-signed certs for development purposes (and perhaps for some online game work) so I&#8217;m going to write up the process to keep it readily accessible here. sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout \/etc\/ssl\/private\/apache-selfsigned.key -out \/etc\/ssl\/certs\/apache-selfsigned.crt In \/etc\/apache2\/conf-available create ssl-params.conf use sudo cp \/etc\/apache2\/sites-available\/default-ssl.conf \/etc\/apache2\/sites-available\/default-ssl.conf.bak &hellip; <a href=\"https:\/\/ninecrows.com\/career\/create-a-self-signed-certificate\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Create a Self Signed Certificate<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-2592","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P7F2Qc-FO","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/pages\/2592"}],"collection":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/comments?post=2592"}],"version-history":[{"count":2,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/pages\/2592\/revisions"}],"predecessor-version":[{"id":2594,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/pages\/2592\/revisions\/2594"}],"wp:attachment":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/media?parent=2592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}