<metaname="twitter:image"content="http://blog.thebestjohn.com/images/default.jpg"><linkrel="icon"href="/images/logo.svg"><linkrel="alternate"href="/atom.xml"type="application/atom+xml"title="TheBestJohn"></head><bodyitemscopeitemtype="https://schema.org/WebPage"><navclass="menu"id="menu"><divclass="menu-inner"><divclass="menu__left-area"><divclass="menu__item"><aclass="menu__item__link menu__item__link--brand"href="/"title="Home"rel="home"><imgclass="menu__item__link--brand__image"src="/images/logo.svg"alt="TheBestJohn"><spanclass="menu__item__link--brand__label">TheBestJohn</span></a></div></div><divclass="menu__right-area"><divclass="menu__item"><aclass="menu__item__link"href="http://blog.thebestjohn.com/">Home</a></div><divclass="menu__item"><aclass="menu__item__link"href="http://blog.thebestjohn.com/about">About</a></div><divclass="menu__item"><aclass="menu__item__link"href="http://blog.thebestjohn.com/archives">Archives</a></div></div></div></nav><divclass="page-background"></div><divclass="content-container"><divclass="content-outer"><divclass="content-inner"itemscopeitemtype="https://schema.org/Blog"><articleclass="article"id="article"itemscopeitemtype="https://schema.org/BlogPosting"><h1class="article__title"itemprop="headline">about</h1><divclass="article__meta"><timeclass="article__meta__time"datetime="2018-04-26T13:54:48.000Z"itemprop="datePublished">2018-04-26 13:54:48</time></div><hr><divclass="article__contents"></div><divclass="article__author"itemscopeitemprop="author"itemtype="https://schema.org/Person"><imgclass="article__author__image"src="/images/avatar.jpg"alt="TheBestJohn"><aclass="article__author__link"title="About TheBestJohn"rel="author">TheBestJohn</a><pclass="article__author__desc">Just a place to make stuff</p><divclass="article__author__socials"><aclass="article__author__socials__item"href="/atom.xml"title="rss"target="_blank"><iclass="fa fa-rss"></i></a></div><metaitemprop="name"content="TheBestJohn"></div><divclass="sharer"id="sharer"><divclass="sharer-inner"><divclass="sharer__right"><buttonclass="sharer__item"id="sharer-facebook"><iclass="fa fa-facebook-official"></i></button><buttonclass="sharer__item"id="sharer-twitter"><iclass="fa fa-twitter"></i></button><buttonclass="sharer__item"id="sharer-pinterest"><iclass="fa fa-pinterest"></i></button><buttonclass="sharer__item"id="sharer-pocket"><iclass="fa fa-get-pocket"></i></button></div></div></div><!-- Disqus Code--><divid="disqus_thread"></div><script>(function(){
<p>Originally I thought I would install it, set up an apache virtual reverse proxy via an <code>.htaccess</code> file and let node serve static files. Some people do this. It’s a valid way to serve a site. The problem that I have with this, is that it’s just another vulnerable layer of code that I don’t have the inclination to audit. It could potentially have glaring security holes and I wouldn’t know. Again, I want to clarify that I don’t know much of anything about security. I’m not a cryptographer, nor an expert on cyber security. However, I can easily read the html that comes out the other end of the site generator and verify that there are no well-known issues with the javascript or html.</p>
<p>Originally I thought I would install it, set up an apache virtual reverse proxy via an <code>.htaccess</code> file and let node serve static files. Some people do this. It’s a valid way to serve a site. The problem that I have with this, is that it’s just another vulnerable layer of code that I don’t have the inclination to audit. It could potentially have glaring security holes and I wouldn’t know. Again, I want to clarify that I don’t know much of anything about security. I’m not a cryptographer, nor an expert on cyber security. However, I can easily read the html that comes out the other end of the site generator and verify that there are no well-known issues with the javascript or html.</p>
<p>If this is the way you wanted to do it, you would need, at the very least, this sort of <code>.htaccess</code> configuration in your root<br><figureclass="highlight plain"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br><spanclass="line">2</span><br><spanclass="line">3</span><br><spanclass="line">4</span><br><spanclass="line">5</span><br><spanclass="line">6</span><br></pre></td><tdclass="code"><pre><spanclass="line">RewriteEngine On</span><br><spanclass="line">DirectoryIndex index.html </span><br><spanclass="line">RewriteRule ^$ http://127.0.0.1:4000 [P,L]</span><br><spanclass="line">RewriteCond %{REQUEST_FILENAME} !-f</span><br><spanclass="line">RewriteCond %{REQUEST_FILENAME} !-d</span><br><spanclass="line">RewriteRule ^(.*)$ http://127.0.0.1:4000/$1 [P,L]</span><br></pre></td></tr></table></figure></p>
<p>If this is the way you wanted to do it, you would need, at the very least, this sort of <code>.htaccess</code> configuration in your root<br><figureclass="highlight plain"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br><spanclass="line">2</span><br><spanclass="line">3</span><br><spanclass="line">4</span><br><spanclass="line">5</span><br><spanclass="line">6</span><br></pre></td><tdclass="code"><pre><spanclass="line">RewriteEngine On</span><br><spanclass="line">DirectoryIndex index.html </span><br><spanclass="line">RewriteRule ^$ http://127.0.0.1:4000 [P,L]</span><br><spanclass="line">RewriteCond %{REQUEST_FILENAME} !-f</span><br><spanclass="line">RewriteCond %{REQUEST_FILENAME} !-d</span><br><spanclass="line">RewriteRule ^(.*)$ http://127.0.0.1:4000/$1 [P,L]</span><br></pre></td></tr></table></figure></p>
<p>So what to do? Well, the output is a fully static html/css/js site. No need for node, no need for a reverse proxy. This will just work when popped into a public directory of a webserver.</p>
<p>So what to do? Well, the output is a fully static html/css/js site. No need for node, no need for a reverse proxy. This will just work when popped into a public directory of a webserver.</p>
<ahref="/posts/setting-up-hexo-auto-deploy-from-gitlab/"title="getting that set up">getting that set up</a></div><divclass="article__author"itemscopeitemprop="author"itemtype="https://schema.org/Person"><imgclass="article__author__image"src="/images/avatar.jpg"alt="TheBestJohn"><aclass="article__author__link"title="About TheBestJohn"rel="author">TheBestJohn</a><pclass="article__author__desc">Just a place to make stuff</p><divclass="article__author__socials"><aclass="article__author__socials__item"href="/atom.xml"title="rss"target="_blank"><iclass="fa fa-rss"></i></a></div><metaitemprop="name"content="TheBestJohn"></div><divclass="sharer"id="sharer"><divclass="sharer-inner"><divclass="sharer__right"><buttonclass="sharer__item"id="sharer-facebook"><iclass="fa fa-facebook-official"></i></button><buttonclass="sharer__item"id="sharer-twitter"><iclass="fa fa-twitter"></i></button><buttonclass="sharer__item"id="sharer-pinterest"><iclass="fa fa-pinterest"></i></button><buttonclass="sharer__item"id="sharer-pocket"><iclass="fa fa-get-pocket"></i></button></div></div></div><!-- Disqus Code--><divid="disqus_thread"></div><script>(function(){