<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Posts on home</title>
    <link>/posts/</link>
    <description>Recent content in Posts on home</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 23 Jun 2020 19:05:29 +0000</lastBuildDate>
    
        <atom:link href="/posts/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Finally Understand Nginx</title>
      <link>/posts/finally-understand-nginx/</link>
      <pubDate>Tue, 23 Jun 2020 19:05:29 +0000</pubDate>
      
      <guid>/posts/finally-understand-nginx/</guid>
      <description>I finally was able to figure out nginx (at least for my use cases). My journey started off with trying to make a reverse proxy for jellyfin. Before, I just exposed a port to the internet and connected to it with server.com:port but that was ugly
Following the guide on their website I was able to get to use my domain name properly without needing to put in a port number and not expose more ports that needed but it still wasn&amp;rsquo;t what I wanted.</description>
      
      <content:encoded><![CDATA[<p>I finally was able to figure out nginx (at least for my use cases). My journey started off with trying to make a reverse proxy for jellyfin. Before, I just exposed a port to the internet and connected to it with <code>server.com:port</code> but that was ugly</p>
<p>Following the guide on their <a href="https://jellyfin.org/docs/general/networking/nginx.html"target="_blank">website</a>
I was able to get to use my domain name properly without needing to put in a port number and not expose more ports that needed but it still wasn&rsquo;t what I wanted. The url was now <code>server.com/jellyfin</code> but I wanted <code>server.jellyfin.com</code> only because of aesthetics reason. I just liked how it looked. I tried a few times by looking at random guides on the internet but I could never figure it out.</p>
<p>Then on youtube, I watched a video by <a href="https://lukesmith.xyz"target="_blank">Luke Smith</a>.
In that <a href="https://www.youtube.com/watch?v=9zP7qooM4pY"target="_blank">video</a>, he showed his viewers how to set up an email server on their own machine.
The way he set up his server finally got me to understand how to set up nginx on my own server and how to set up my domain name.
It still uses pretty much the same config provided by jellyfin but now I am able to use <code>jellyfin.server.com</code>.</p>
<p>It's a small change but it really made me happy.
I will post the config here but leave out the stuff that certbot includes to set up https and redirecting to https.
Don't forget to symlink to <code>sites-enabled</code>!</p>
<pre><code>root@server:/etc/nginx/sites-available# cat jellyfin 
server {
        server_name jellyfin.server.com www.jellyfin.server.com;

        location / {
                proxy_pass http://localhost:8096;
                proxy_pass_request_headers on;

                proxy_set_header Host $host;

                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Forwarded-Host $http_host;

                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $http_connection;

                # Disable buffering when the nginx proxy gets very resource heavy upon streaming
                proxy_buffering off;
        }
}
</code></pre>]]></content:encoded>
      
    </item>
    
    <item>
      <title>First Post</title>
      <link>/posts/first-post/</link>
      <pubDate>Tue, 23 Jun 2020 15:46:03 +0000</pubDate>
      
      <guid>/posts/first-post/</guid>
      <description>Testing out the new blog!</description>
      
      <content:encoded><![CDATA[<p>Testing out the new blog!</p>
]]></content:encoded>
      
    </item>
    
  </channel>
</rss>
