<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>robkorv.nl</title>
    <description>Dit is het kladblok van Robbert Korving, ik plaats hier aantekeningen voor open-source ontwikkel avonturen.
</description>
    <link>https://robkorv.nl/</link>
    <atom:link href="https://robkorv.nl/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Mon, 03 Oct 2022 11:33:28 +0000</pubDate>
    <lastBuildDate>Mon, 03 Oct 2022 11:33:28 +0000</lastBuildDate>
    <generator>Jekyll v3.9.2</generator>
    
      <item>
        <title>Github page lokaal ontwikkelen</title>
        <description>&lt;p&gt;Met de volgende instructies kan je lokaal Github pages ontwikkelen. De instructies
zorgen ervoor dat je lokaal dezelfde setup hebt, als Github gebruikt voor het
genereren van pages.&lt;/p&gt;

&lt;p&gt;Ik ga ervan uit dat ruby via rbenv beschikbaar is zoals bij
&lt;a href=&quot;/een-ruby-omgeving-per-project-in-ubuntu/&quot;&gt;Een ruby omgeving per project in Ubuntu&lt;/a&gt;
is beschreven.&lt;/p&gt;

&lt;h2 id=&quot;lets-go&quot;&gt;Let’s go&lt;/h2&gt;

&lt;p&gt;Maak een dir aan, bijvoorbeeld &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;my-gh-page&lt;/code&gt; en zorg dat je in de dir staat voordat
je de commando’s uitvoert.&lt;/p&gt;

&lt;p&gt;Bezoek &lt;a href=&quot;https://pages.github.com/versions/&quot;&gt;GitHub Pages Dependency versions&lt;/a&gt; en
zorg dat je tenminste de ruby versie hebt die wordt genoemd. 
In dit voorbeeld wordt versie 2.2.2 geïnstalleerd.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;installeer ruby en bundler met de volgende commando’s:&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# ruby installeren&lt;/span&gt;
rbenv &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;2.2.2
&lt;span class=&quot;c&quot;&gt;# bundler installeren&lt;/span&gt;
gem &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;bundler
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;maak een &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Gemfile&lt;/code&gt; bestand aan met de volgende inhoud:&lt;/p&gt;

    &lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://rubygems.org'&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'json'&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'open-uri'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;versions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'https://pages.github.com/versions.json'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'github-pages'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;versions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'github-pages'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;installeer vervolgens &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;github-pages&lt;/code&gt; met
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundle install --binstubs .bundle/bin&lt;/code&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;creëer een standaard template met &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll new .&lt;/code&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Bekijk de website met &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lees meer over het maken van websites met Jekyll in de
&lt;a href=&quot;http://jekyllrb.com/docs/home/&quot;&gt;documentatie&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;lees-meer&quot;&gt;lees meer&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://help.github.com/articles/using-jekyll-with-pages/&quot;&gt;Using Jekyll with Pages&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://jekyllrb.com/docs/github-pages/&quot;&gt;GitHub Pages&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sat, 18 Jul 2015 15:57:23 +0000</pubDate>
        <link>https://robkorv.nl/github-page-lokaal-ontwikkelen</link>
        <guid isPermaLink="true">https://robkorv.nl/github-page-lokaal-ontwikkelen</guid>
        
        
        <category>ruby</category>
        
        <category>ubuntu</category>
        
        <category>rbenv</category>
        
        <category>bundler</category>
        
      </item>
    
      <item>
        <title>Een uitgaande mailserver opzetten in Ubuntu</title>
        <description>&lt;p&gt;Web applicaties vesturen vaak mailtjes. Denk aan het bevestigen van een account,
wachtwoord opvragen, o.i.d. Hiervoor is geen volwaardige mailserver nodig, een
server die enkelt mail verstuurd is voldoende. De volgende instructies zorgen
ervoor dat zo’n server wordt opgezet.&lt;/p&gt;

&lt;h2 id=&quot;mailserver-installeren-en-configureren&quot;&gt;Mailserver installeren en configureren&lt;/h2&gt;

&lt;p&gt;In plaats van apt-get wordt er tasksel gebruikt. Tasksel installeerd niet alleen
packages, hij stelt ze ook voor je in. Tasksel toond waar nodig een wizard om
de juiste instellingen per situatie te laden. Tasksel zal voor de mailserver
vragen voor welke situatie deze wordt gebruikt&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# mailserver via tasksel installeren&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;tasksel &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;mail-server
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/img/2014-09-30-een-uitgaande-mailserver-opzetten-in-ubuntu_01.png&quot; alt=&quot;e-mailserverconfiguratie&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Kies tijdens de installatie voor &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Internetsite&lt;/code&gt;. Vervolg de wizard.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/2014-09-30-een-uitgaande-mailserver-opzetten-in-ubuntu_02.png&quot; alt=&quot;E-mail-naam&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let wel op dat als de mailserver een bepaald domein vertegenwoordigd dit goed wordt
ingesteld. Als dit niet goed wordt ingesteld zullen de mails altijd in de spambox
van de ontvanger terecht komen. Voor een locale ontwikkel server kan je de al aanwezige
instellingen gebruiken, kijk dan wel in je spambox als je mail verwacht.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/2014-09-30-een-uitgaande-mailserver-opzetten-in-ubuntu_03.png&quot; alt=&quot;self-signed certificate aanmaken&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Maak een self-signed certificate aan, de mailserver wordt niet extern benaderd maar
een certificaat is wel nodig voor de basis instelling.&lt;/p&gt;

&lt;h2 id=&quot;testen&quot;&gt;Testen&lt;/h2&gt;

&lt;p&gt;Stuur vervolgens een test mailtje via de terminal, vergeet niet het email adres
te wijzigen.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;echo &quot;Dit is de inhoud van een testmail&quot; | mail -s &quot;Dit is het onderwerp van de testmail&quot; &quot;aan@mailadres&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Kijk in je spambox!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/2014-09-30-een-uitgaande-mailserver-opzetten-in-ubuntu_04.png&quot; alt=&quot;spam vanwege ontwikkel instelling&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;lees-meer&quot;&gt;lees meer&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://help.ubuntu.com/14.04/serverguide/email-services.html&quot;&gt;Handleiding Ubuntu-server: Email Services&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Tue, 30 Sep 2014 16:14:00 +0000</pubDate>
        <link>https://robkorv.nl/een-uitgaande-mailserver-opzetten-in-ubuntu</link>
        <guid isPermaLink="true">https://robkorv.nl/een-uitgaande-mailserver-opzetten-in-ubuntu</guid>
        
        
        <category>ruby</category>
        
        <category>ubuntu</category>
        
      </item>
    
      <item>
        <title>301 Redirect met Nginx in Ubuntu</title>
        <description>&lt;p&gt;Een 301 is een HTTP status code waarmee je aan de client doorgeeft dat het bezochte
adres permanent is verhuist naar een ander adres. Dit is ook de manier om aan
zoekmachines door te geven dat een url is verplaatst. Handig bij domein wijzigingen
en url aanpassingen dus.&lt;/p&gt;

&lt;p&gt;De volgend instructies zijn geschreven voor &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nginx/1.6.0&lt;/code&gt;. Lees
&lt;a href=&quot;/nginx-met-spdy-in-ubuntu/#nginx-installeren&quot;&gt;Nginx installeren&lt;/a&gt;
voor instructies om de meest recente Nginx te installeren in Ubuntu.&lt;/p&gt;

&lt;p&gt;Redirecten met Nginx gaat via een virtualhost.&lt;/p&gt;

&lt;h2 id=&quot;nginx-redirect-virtual-host&quot;&gt;Nginx redirect virtual host&lt;/h2&gt;

&lt;p&gt;Als voorbeeld, zal de volgende instructies http://btstrp.localtest.me redirecten
naar http://bootstrap.localtest.me. Zie
&lt;a href=&quot;/nginx-met-spdy-in-ubuntu/#nginx-http-virtual-host&quot;&gt;Nginx http virtual host&lt;/a&gt;
voor de vhost waarnaartoe geredirect wordt.&lt;/p&gt;

&lt;p&gt;Maak &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/sites-available/btstrp-redirect&lt;/code&gt; aan met de volgende inhoud.&lt;/p&gt;

&lt;div class=&quot;language-nginx highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;server&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kn&quot;&gt;server_name&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;btstrp.localtest.me&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;kn&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;301&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;http://bootstrap.localtest.me&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$request_uri&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# symlink de vhost naar sites-enabled&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /etc/nginx/sites-available/btstrp-redirect /etc/nginx/sites-enabled/
&lt;span class=&quot;c&quot;&gt;# herstart nginx&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;service nginx restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Open http://btstrp.localtest.me en zie dat deze geredirect wordt. Het hele url
wordt geredirect, http://btstrp.localtest.me/examples/carousel/ zal dezelfde locatie
openen op bootstrap.localtest.me.&lt;/p&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;lees-meer&quot;&gt;lees meer&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/HTTP_301&quot;&gt;HTTP 301 - Wikipedia, the free encyclopedia&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return&quot;&gt;Nginx http rewrite module - return&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 31 Aug 2014 21:18:40 +0000</pubDate>
        <link>https://robkorv.nl/301-redirect-met-nginx-in-ubuntu</link>
        <guid isPermaLink="true">https://robkorv.nl/301-redirect-met-nginx-in-ubuntu</guid>
        
        
        <category>ubuntu</category>
        
        <category>nginx</category>
        
        <category>virtualhost</category>
        
        <category>redirect</category>
        
      </item>
    
      <item>
        <title>Nginx met SPDY in Ubuntu</title>
        <description>&lt;p&gt;SPDY is een verbetering van het HTTPS protocol en is zo’n 40% sneller. Encryptie
is vereist voor SPDY, het is daarom alleen in productie te gebruiken als er een
geauthoriseerd SSL/TLS sleutel aanwezig is.&lt;/p&gt;

&lt;p&gt;SPDY is nog experimenteel, wat niet inhoud dat het niet productie gereed is.
Experimenteel houdt voor SPDY in dat niet elke browser er mee overweg kan. SPDY
is een laag boven op HTTPS, een browser zonder SPDY ondersteuning zal de site via
traditionele HTTPS laden. SPDY wordt overigens in elke moderne browser ondersteund
met uitzondering van Internet Explorer. Google, Facebook, YouTube en Twitter zijn
enkele grote sites die met SPDY serveren.&lt;/p&gt;

&lt;p&gt;Met de volgend instructies kan je via Nginx serveren met SPDY.&lt;/p&gt;

&lt;h2 id=&quot;nginx-installeren&quot;&gt;Nginx installeren&lt;/h2&gt;

&lt;p&gt;Het &lt;a href=&quot;https://launchpad.net/~nginx&quot;&gt;Nginx team&lt;/a&gt; op launchpad verzorgt een up to
date PPA. Hierdoor is de nieuwste stabiele versie altijd beschikbaar, ook als de
versie in de standard Ubuntu repository verouderd is.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# nginx stable ppa aan het systeem toevoegen&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;add-apt-repository ppa:nginx/stable
&lt;span class=&quot;c&quot;&gt;# package list updaten&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get update
&lt;span class=&quot;c&quot;&gt;# nginx installeren&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;nginx
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Open http://localhost/ en de standaard &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Welcome to nginx!&lt;/code&gt; pagina zal laden.&lt;/p&gt;

&lt;h2 id=&quot;nginx-configureren&quot;&gt;Nginx configureren&lt;/h2&gt;

&lt;p&gt;Als voorbeeld, zal de volgende configuratie instructies, de documentatie van
&lt;a href=&quot;http://getbootstrap.com/&quot;&gt;bootstrap&lt;/a&gt; lokaal hosten met Nginx via SPDY.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# maak een www dir aan in home
mkdir ~/www
# ga in de www dir ~/www
cd ~/www
# download de documentatie zip
wget https://github.com/twbs/bootstrap/archive/gh-pages.zip
# pak de zip uit
unzip gh-pages.zip
# verwijder de gedownloade zip
rm gh-pages.zip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;nginx-configuratie-layout-in-ubuntu&quot;&gt;Nginx configuratie layout in Ubuntu&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/nginx.conf&lt;/code&gt;
    &lt;ul&gt;
      &lt;li&gt;Basis instellingen beheerd door het Nginx team.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/sites-available/&lt;/code&gt;
    &lt;ul&gt;
      &lt;li&gt;Site specifieke configuraties, oftewel virtual host configs. Deze erven de
instellingen uit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nginx.conf&lt;/code&gt;.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/sites-enabled/&lt;/code&gt;
    &lt;ul&gt;
      &lt;li&gt;Symlinks naar virtual hosts uit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/sites-available/&lt;/code&gt;, een virtual
host die hier gelinkt is wordt opgepakt door Nginx.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/conf.d/&lt;/code&gt;
    &lt;ul&gt;
      &lt;li&gt;De plek voor overige configuraties. Nginx pakt elke &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*.conf&lt;/code&gt; in deze directory
op. Zet hier instellingen neer om &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nginx.conf&lt;/code&gt; uit te breiden of te overulen.
Hierdoor zal een updaten van Nginx nooit voor een conflict zorgen in
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nginx.conf&lt;/code&gt;.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Zo wordt de &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Welcome to nginx!&lt;/code&gt; pagina door Nginx gehost.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lah&lt;/span&gt; /etc/nginx/sites-available/
&lt;span class=&quot;c&quot;&gt;# totaal 12K&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# drwxr-xr-x 2 root root 4,0K aug 27 22:19 .&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# drwxr-xr-x 5 root root 4,0K aug 27 22:19 ..&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# -rw-r--r-- 1 root root 2,6K apr 24 18:23 default&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lah&lt;/span&gt; /etc/nginx/sites-enabled/
&lt;span class=&quot;c&quot;&gt;# totaal 8,0K&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# drwxr-xr-x 2 root root 4,0K aug 27 22:19 .&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# drwxr-xr-x 5 root root 4,0K aug 27 22:19 ..&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# lrwxrwxrwx 1 root root   34 aug 27 22:19 default -&amp;gt; /etc/nginx/sites-available/default&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# default uitzetten&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo rm&lt;/span&gt; /etc/nginx/sites-enabled/default
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;service nginx restart
&lt;span class=&quot;c&quot;&gt;# * Restarting nginx nginx&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   ...done.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# http://localhost/ zal nu niets laden.&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# default aanzetten&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /etc/nginx/sites-available/default /etc/nginx/sites-enabled/
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;service nginx restart
&lt;span class=&quot;c&quot;&gt;# * Restarting nginx nginx&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   ...done.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# http://localhost/ zal nu weer default laden.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;nginx-http-virtual-host&quot;&gt;Nginx http virtual host&lt;/h3&gt;

&lt;p&gt;Maak &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/sites-available/bootstrap&lt;/code&gt; aan met de volgende inhoud.&lt;/p&gt;

&lt;div class=&quot;language-nginx highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;server&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# luister naar de default http port&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;listen&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# maak de site beschikbaar op http://bootstrap.localtest.me&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;server_name&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;bootstrap.localtest.me&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# stel de root in op de bootstrap documentatie&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/home/mijnusernaam/www/bootstrap-gh-pages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;kn&quot;&gt;location&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;# Probeer de request als bestand te serveren, daarna&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;# als directory, daarna terugvallen op 404 foutcode.&lt;/span&gt;
                &lt;span class=&quot;kn&quot;&gt;try_files&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$uri&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$uri&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;404&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# symlink de vhost naar sites-enabled&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo ln&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; /etc/nginx/sites-available/bootstrap /etc/nginx/sites-enabled/
&lt;span class=&quot;c&quot;&gt;# herstart nginx&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;service nginx restart
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Open http://bootstrap.localtest.me.&lt;/p&gt;

&lt;h3 id=&quot;nginx-https-virtual-host&quot;&gt;Nginx https virtual host&lt;/h3&gt;

&lt;p&gt;Voeg het volgende toe in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/nginx/ssl_session.conf&lt;/code&gt;. Hiermee wordt de cpu wat
ontlast doordat er minder SSL handshakes zullen plaatsvinden.&lt;/p&gt;

&lt;div class=&quot;language-nginx highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;ssl_session_cache&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;shared:SSL:10m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;ssl_session_timeout&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;De bootstrap vhost ziet er voor https als volgt uit. Let op, deze gebruikt een
zelf gesigneerde certificaat die door Ubuntu is gegenereerd. Gebruik deze
oplossing niet in productie!&lt;/p&gt;

&lt;div class=&quot;language-nginx highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;server&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# luister naar de default http port&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;listen&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# maar redirect http naar https&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$scheme&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;http)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kn&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;301&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;https://&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$server_name$request_uri&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# luister naar de https port met ssl&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;listen&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;443&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;ssl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# ssl instellingen&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_certificate&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/etc/ssl/certs/ssl-cert-snakeoil.pem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_certificate_key&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/etc/ssl/private/ssl-cert-snakeoil.key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_protocols&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;TLSv1&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;TLSv1.1&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;TLSv1.2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_prefer_server_ciphers&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_ciphers&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;EECDH+ECDSA+AESGCM&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+aRSA+AESGCM&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+ECDSA+SHA384&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+ECDSA+SHA256&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+aRSA+SHA384&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+aRSA+SHA256&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+aRSA+RC4&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EDH+aRSA&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;RC4&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!aNULL&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!eNULL&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!LOW&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!3DES&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!MD5&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!EXP&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!PSK&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!SRP&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!DSS&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# geef aan de client door dat alle requests over https moeten gaan&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;add_header&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Strict-Transport-Security&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;max-age=31536000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;includeSubDomains&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# maak de site beschikbaar op http://bootstrap.localtest.me&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;server_name&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;bootstrap.localtest.me&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# stel de root in op de bootstrap documentatie&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/home/mijnusernaam/www/bootstrap-gh-pages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;kn&quot;&gt;location&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;# Probeer de request als bestand te serveren, daarna&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;# als directory, daarna terugvallen op 404 foutcode.&lt;/span&gt;
                &lt;span class=&quot;kn&quot;&gt;try_files&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$uri&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$uri&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;404&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Herstart Nginx met &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo service nginx restart&lt;/code&gt; en open
https://bootstrap.localtest.me. Je krijgt een waarschuwing omdat het certificaat
niet geauthoriseerd is.&lt;/p&gt;

&lt;h3 id=&quot;nginx-spdy-virtual-host&quot;&gt;Nginx SPDY virtual host&lt;/h3&gt;

&lt;p&gt;Voeg &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;spdy&lt;/code&gt; toe achter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ssl&lt;/code&gt; in de
&lt;a href=&quot;#nginx-https-virtual-host&quot;&gt;Nginx https virtual host&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;language-nginx highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;server&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# luister naar de default http port&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;listen&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# maar redirect http naar https&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$scheme&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;http)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kn&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;301&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;https://&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$server_name$request_uri&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# luister naar de https port met ssl&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;listen&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;443&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;ssl&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;spdy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;De volledige Nginx SPDY virtual host ziet er als volgt uit.&lt;/p&gt;

&lt;div class=&quot;language-nginx highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;server&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# luister naar de default http port&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;listen&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# maar redirect http naar https&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$scheme&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;http)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;kn&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;301&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;https://&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$server_name$request_uri&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# luister naar de https port met ssl&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;listen&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;443&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;ssl&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;spdy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# ssl instellingen&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_certificate&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/etc/ssl/certs/ssl-cert-snakeoil.pem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_certificate_key&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/etc/ssl/private/ssl-cert-snakeoil.key&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_protocols&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;TLSv1&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;TLSv1.1&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;TLSv1.2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_prefer_server_ciphers&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;ssl_ciphers&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;EECDH+ECDSA+AESGCM&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+aRSA+AESGCM&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+ECDSA+SHA384&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+ECDSA+SHA256&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+aRSA+SHA384&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+aRSA+SHA256&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH+aRSA+RC4&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EECDH&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;EDH+aRSA&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;RC4&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!aNULL&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!eNULL&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!LOW&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!3DES&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!MD5&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!EXP&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!PSK&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!SRP&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;!DSS&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# geef aan de client door dat alle requests over https moeten gaan&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;add_header&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Strict-Transport-Security&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;max-age=31536000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;includeSubDomains&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# maak de site beschikbaar op http://bootstrap.localtest.me&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;server_name&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;bootstrap.localtest.me&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;# stel de root in op de bootstrap documentatie&lt;/span&gt;
        &lt;span class=&quot;kn&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/home/mijnusernaam/www/bootstrap-gh-pages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;kn&quot;&gt;location&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;# Probeer de request als bestand te serveren, daarna&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;# als directory, daarna terugvallen op 404 foutcode.&lt;/span&gt;
                &lt;span class=&quot;kn&quot;&gt;try_files&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$uri&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$uri&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;404&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;lees-meer&quot;&gt;lees meer&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;http://www.chromium.org/spdy&quot;&gt;SPDY is an experiment with protocols for the web&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://caniuse.com/#feat=spdy&quot;&gt;Can I use SPDY?&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.mare-system.de/guide-to-nginx-ssl-spdy-hsts/&quot;&gt;Guide to Nginx + SSL + SPDY&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://wiki.nginx.org/Configuration&quot;&gt;Nginx Configuration&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://nginx.com/resources/admin-guide/nginx-ssl-termination/&quot;&gt;NGINX SSL Termination&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 17 Aug 2014 20:46:23 +0000</pubDate>
        <link>https://robkorv.nl/nginx-met-spdy-in-ubuntu</link>
        <guid isPermaLink="true">https://robkorv.nl/nginx-met-spdy-in-ubuntu</guid>
        
        
        <category>ubuntu</category>
        
        <category>nginx</category>
        
        <category>spdy</category>
        
        <category>https</category>
        
        <category>virtualhost</category>
        
      </item>
    
      <item>
        <title>Een ruby omgeving per project in Ubuntu</title>
        <description>&lt;p&gt;Met de volgende instructies kan een Ruby ontwikkel omgeving op directory niveau
ingesteld worden, onafhankelijk van Ubuntu’s package manager. Hiermee voorkom je
de situatie dat een project een Ruby versie nodig heeft, die niet wordt
aangeboden door de packagemanager. Een ander groot voordeel is dat
verschillende Ruby versies naast elkaar gebruikt kunnen worden.&lt;/p&gt;

&lt;h2 id=&quot;rbenv-en-plugins-installeren&quot;&gt;rbenv en plugins installeren&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;clone de repositories naar de juiste directories.&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
git clone https://github.com/ianheggie/rbenv-binstubs.git ~/.rbenv/plugins/rbenv-binstubs
git clone https://github.com/rkh/rbenv-update.git ~/.rbenv/plugins/rbenv-update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;voeg het volgende toe aan &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt;.&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# rbenv&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/.rbenv/bin:&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;eval&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;rbenv init -&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;sluit de huidige terminal en start een nieuwe. Test het commando &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv&lt;/code&gt;.&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rbenv
&lt;span class=&quot;c&quot;&gt;# rbenv 0.4.0-98-g13a474c&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Usage: rbenv &amp;lt;command&amp;gt; [&amp;lt;args&amp;gt;]&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Some useful rbenv commands are:&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    commands    List all available rbenv commands&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    local       Set or show the local application-specific Ruby version&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    global      Set or show the global Ruby version&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    shell       Set or show the shell-specific Ruby version&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    install     Install a Ruby version using ruby-build&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    uninstall   Uninstall a specific Ruby version&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    rehash      Rehash rbenv shims (run this after installing executables)&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    version     Show the current Ruby version and its origin&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    versions    List all Ruby versions available to rbenv&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    which       Display the full path to an executable&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    whence      List all Ruby versions that contain the given executable&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# See `rbenv help &amp;lt;command&amp;gt;' for information on a specific command.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# For full documentation, see: https://github.com/sstephenson/rbenv#readme&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;rbenv-gebruiken&quot;&gt;rbenv gebruiken&lt;/h2&gt;

&lt;h3 id=&quot;ruby-installeren&quot;&gt;ruby installeren&lt;/h3&gt;

&lt;p&gt;Installeer de volgende dependencies om ruby te kunnen builden met rbenv.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# laat alle installeerbare ruby versies zien&lt;/span&gt;
rbenv &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-l&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# installeer ruby versie 2.1.2&lt;/span&gt;
rbenv &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;2.1.2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;ruby-versie-gebruiken&quot;&gt;ruby versie gebruiken&lt;/h3&gt;

&lt;p&gt;Ga naar de root directory van het project waar je een bepaalde ruby versie wilt
gebruiken.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;mijn-app
&lt;span class=&quot;c&quot;&gt;# laat de geinstalleerde ruby versies zien&lt;/span&gt;
rbenv versions
&lt;span class=&quot;c&quot;&gt;# gebruik ruby versie 2.1.2 in deze en bovenliggende directories&lt;/span&gt;
rbenv &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;2.1.2
&lt;span class=&quot;c&quot;&gt;# laat de actieve ruby in deze directory zien&lt;/span&gt;
rbenv version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Het command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rbenv local 2.1.2&lt;/code&gt; creeërt een &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ruby-version&lt;/code&gt; bestand in de huidige
directory. Hierin wordt de ruby versie opgeslagen. Voeg dit bestand toe aan
versiebeheer zodat de ruby versie wordt opgelagen in het project.&lt;/p&gt;

&lt;h3 id=&quot;bundler-gebruiken&quot;&gt;bundler gebruiken&lt;/h3&gt;

&lt;p&gt;Als bundler binnen het project wordt gebruikt roep de &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;install&lt;/code&gt; dan op de volgende
wijze aan.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bundle &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--binstubs&lt;/span&gt; .bundle/bin
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Hierdoor kunnnen de commando’s die bundler installeert zonder &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bundle exec&lt;/code&gt;
aangeroepen worden.&lt;/p&gt;

&lt;h3 id=&quot;rbenv-updaten&quot;&gt;rbenv updaten&lt;/h3&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rbenv update
&lt;span class=&quot;c&quot;&gt;# updating rbenv&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already on 'master'&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Your branch is up-to-date with 'origin/master'.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  From https://github.com/sstephenson/rbenv&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  * branch            master     -&amp;gt; FETCH_HEAD&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already up-to-date.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# updating rbenv-binstubs&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already on 'master'&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Your branch is up-to-date with 'origin/master'.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  From https://github.com/ianheggie/rbenv-binstubs&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  * branch            master     -&amp;gt; FETCH_HEAD&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already up-to-date.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# updating rbenv-gem-rehash&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already on 'master'&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Your branch is up-to-date with 'origin/master'.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  From https://github.com/sstephenson/rbenv-gem-rehash&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  * branch            master     -&amp;gt; FETCH_HEAD&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already up-to-date.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# updating rbenv-update&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already on 'master'&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Your branch is up-to-date with 'origin/master'.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  From https://github.com/rkh/rbenv-update&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  * branch            master     -&amp;gt; FETCH_HEAD&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already up-to-date.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# updating ruby-build&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already on 'master'&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Your branch is up-to-date with 'origin/master'.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  From https://github.com/sstephenson/ruby-build&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  * branch            master     -&amp;gt; FETCH_HEAD&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  Already up-to-date.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# reloading rbenv&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  |  done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;lees-meer&quot;&gt;lees meer&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/sstephenson/rbenv&quot;&gt;rbenv&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/sstephenson/ruby-build&quot;&gt;ruby-build&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/sstephenson/rbenv-gem-rehash&quot;&gt;rbenv-gem-rehash&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/ianheggie/rbenv-binstubs&quot;&gt;rbenv-binstubs&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/rkh/rbenv-update&quot;&gt;rbenv-update&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sat, 16 Aug 2014 14:31:26 +0000</pubDate>
        <link>https://robkorv.nl/een-ruby-omgeving-per-project-in-ubuntu</link>
        <guid isPermaLink="true">https://robkorv.nl/een-ruby-omgeving-per-project-in-ubuntu</guid>
        
        
        <category>ruby</category>
        
        <category>ubuntu</category>
        
        <category>rbenv</category>
        
        <category>bundler</category>
        
      </item>
    
  </channel>
</rss>
