<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Thieves Like Us]]></title><description><![CDATA[Opinions and code. But mostly opinions.]]></description><link>http://brianmajewski.com/</link><generator>Ghost 0.6</generator><lastBuildDate>Wed, 08 Apr 2026 13:11:44 GMT</lastBuildDate><atom:link href="http://brianmajewski.com/tag/configuration/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Going Postal]]></title><description><![CDATA[<p>As mentioned previously, I went with a barebones roll-your-own approach to setting up this server. One of the things that slipped my mind initially was mail forwarding. My former cPanel site made setting up things like mail forwarding a matter of a few clicks. Instead, I got to play with</p>]]></description><link>http://brianmajewski.com/2014/11/09/going-postal/</link><guid isPermaLink="false">9a9cff45-08fd-46b3-8b82-39726c032bd2</guid><category><![CDATA[configuration]]></category><category><![CDATA[dns]]></category><category><![CDATA[postfix]]></category><category><![CDATA[email]]></category><dc:creator><![CDATA[Brian Majewski]]></dc:creator><pubDate>Sun, 09 Nov 2014 16:37:35 GMT</pubDate><media:content url="http://brianmajewski.com/content/images/2015/01/post-office-tub-1109.jpg" medium="image"/><content:encoded><![CDATA[<img src="http://brianmajewski.com/content/images/2015/01/post-office-tub-1109.jpg" alt="Going Postal"><p>As mentioned previously, I went with a barebones roll-your-own approach to setting up this server. One of the things that slipped my mind initially was mail forwarding. My former cPanel site made setting up things like mail forwarding a matter of a few clicks. Instead, I got to play with DNS and Postfix<sup><a href="http://brianmajewski.com/2014/11/09/going-postal/#fn1" id="ref1">1</a></sup> this morning.</p>

<p>Here is what I ended up doing:</p>

<ul>
<li><p>Modified my DNS records</p>

<p>When I set up my original DNS, I only did the bare minimum, pointing my raw domain at my IP address. Now, I added a couple of CNAME records, <code>www</code> and <code>mail</code> to point to my main domain and an MX record to point to my mail subdomain with a priority of 1. Digital Ocean has <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean">a control panel</a> to make these changes. When all were entered, the configuration had the following new entries:</p></li>
</ul>

<pre><code>www.brianmajewski.com. 1800 IN CNAME brianmajewski.com.  
mail.brianmajewski.com. 1800 IN CNAME brianmajewski.com.  
brianmajewski.com. 1800 IN MX 1 mail.brianmajewski.com.  
</code></pre>

<ul>
<li><p>Took a shower while the DNS propagated.</p></li>
<li><p>Now, with my server listening for incoming mail, I had to send it somewhere. I wanted to forward all mail to this domain to a catch-all address I have with gmail. So, first, ensure that Postfix is installed, with <code>dpkg -s postfix</code> and if not, install it with <code>apt-get install postfix</code></p></li>
<li><p>Now we want to tell Postfix about our virtual domain. I added the following lines to <code>/etc/postfix/main.cf</code>:</p></li>
</ul>

<pre><code>virtual_alias_domains = brianmajewski.com  
virtual_alias_maps = hash:/etc/postfix/virtual  
</code></pre>

<ul>
<li>And then I created the mapping rules in <code>/etc/postfix/virtual</code>. You can do individual mapping of addresses, but for me, the catch-all is more useful.</li>
</ul>

<pre><code>@brianmajewski.com   (not-really-)my-actual-address@gmail.com
</code></pre>

<ul>
<li>Time to reload Postfix.</li>
</ul>

<pre><code>postmap /etc/postfix/virtual  
/etc/init.d/postfix reload
</code></pre>

<ul>
<li>And finally I fired off an email to <a href="mailto:hireme@brianmajewski.com">hireme@brianmajewski.com</a> and basked in the glory of success.</li>
</ul>

<p>And all of this before 8:30am on a Sunday morning...</p>

<p><sup id="fn1">1. I use the word play loosely. I used to regularly do work like this, had the O'Reily book and everything, but it's amazing what one forgets over a couple decades.<a href="http://brianmajewski.com/2014/11/09/going-postal/#ref1">↩</a></sup></p>]]></content:encoded></item><item><title><![CDATA[README.md]]></title><description><![CDATA[<p><a href="http://brianmajewski.com/2014/11/08/behind-the-scenes/#tldr">tl;dr - How did you configure this thing?</a></p>

<p>I've been kicking around the idea of a "professional" personal blog for some time. While I have other outlets for more <del>questionable</del> creative pursuits, I've never had a platform to talk about the things I do that actually pay the bills.</p>]]></description><link>http://brianmajewski.com/2014/11/08/behind-the-scenes/</link><guid isPermaLink="false">bf99e91e-25fc-4da1-87ca-609c86574baf</guid><category><![CDATA[configuration]]></category><category><![CDATA[nginx]]></category><dc:creator><![CDATA[Brian Majewski]]></dc:creator><pubDate>Sun, 09 Nov 2014 03:38:11 GMT</pubDate><media:content url="http://brianmajewski.com/content/images/2014/12/google-data-center-internal-2012-1-1320px.jpg" medium="image"/><content:encoded><![CDATA[<img src="http://brianmajewski.com/content/images/2014/12/google-data-center-internal-2012-1-1320px.jpg" alt="README.md"><p><a href="http://brianmajewski.com/2014/11/08/behind-the-scenes/#tldr">tl;dr - How did you configure this thing?</a></p>

<p>I've been kicking around the idea of a "professional" personal blog for some time. While I have other outlets for more <del>questionable</del> creative pursuits, I've never had a platform to talk about the things I do that actually pay the bills.</p>

<p>Of course, this led to an absurdly long period of evaluating technologies, reading support forums, and determining what it is I actually wanted to do here.</p>

<p>Eventually, I decided that I wanted something node.js based, purpose built for blogging, with the ability to serve up other pages - resume, project demos, fnords.</p>

<p>Why node.js? Because I don't like Ruby or PHP? Because I like working with JavaScript? Because all the cool kids are doing it? Why not?</p>

<p>So, I dug into the bookmarks, and saw Ghost. Perfect. Open source, largish community, lots of themes. Sign me up. Or rather download the code.</p>

<p>My only mental hurdle was the part about serving up other pages. My hosting provider for some of my other sites is a more standard shared hosting provider, with most management done through a cPanel interface. Other "one-click" ghost hosting providers had no real answer either. It took me an embarrasing amount of time to drop those dead ends and just go for a simple setup that I controlled end to end.</p>

<p>I found an inexpensive provider that allowed me to quickly setup up a simple stack with nginx proxying to Ghost. A few lines of configuration later and I had a directory to serve content out of that was outside of the Ghost system. It was a good reminder that when you find yourself spinning on a problem, remove all constraints and reduce it down to its simplest form.</p>

<p><a name="tldr"></a>For posterity, here's what I did to get up and running:</p>

<ul>
<li>Created an account with <a href="https://www.digitalocean.com/?refcode=495ef0e21d62">Digital Ocean</a> and created a droplet using the Ghost application template. There are some <a href="https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-ghost-application">dead simple instructions</a> you can follow.</li>
<li>Added the nginx configuration to serve up files outside of the Ghost world. I created a directory <code>/var/www/vault</code>, to hold the content, then edited <code>/etc/nginx/sites-available/ghost</code>. Above the <code>location</code> block, I added the following:</li>
</ul>

<pre><code>location ^~ /vault/ {  
    alias /var/www/vault/;
}
</code></pre>

<ul>
<li>The last thing I wanted to do was to forward an existing link to my resume so above the code above I added</li>
</ul>

<pre><code>location = /resume.html {  
    return 301 /vault/resume/;
}
</code></pre>

<p>In the future, if I end up modifying the configuration I will document it here, but otherwise a fairly painless process once I got out of my own way.</p>]]></content:encoded></item></channel></rss>