Papermod theme is working and added a post for figuring out Hugo. Great progress.

This commit is contained in:
Norm Rasmussen
2023-09-20 17:17:33 -04:00
parent 542a3edd00
commit e8b28618fc
40 changed files with 2735 additions and 1449 deletions

View File

@ -2,4 +2,5 @@
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
tags = []
+++

View File

@ -0,0 +1,117 @@
+++
title = 'Trouble Hosting Hugo with Nginx'
date = 2023-09-20T11:33:22-04:00
draft = false
tags = ["tips & tricks", "self-hosted", "troubleshooting" ]
+++
For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not
loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse
proxy protocols such as `$proxy_host`, `$forward_scheme`, and `$port`. There are a few more and I'm happy to share some
reverse proxy nginx config files. See my post on [moving from NPM to Nginx]({{< ref "posts/npm_to_nginx_tutorial.md" >}}) for more information.
Once I got the basic idea of this blog up and running, I ran `hugo` and then used `scp` to send the files to my nginx host's
public folder. Despite `index.html` and all the CSS files being in the right spots, I kept getting a few repetitive errors
from nginx - either in my browser's console or in nginx's log files. I swore I read through every StackOverflow or personal
blog post I could find. In fact, the next day, I would sit back down after work to debug and I would continue to find the
same sites and posts I found the day before! It was getting frustrating.
Wouldn't you know... it was one of the simplest solutions that got it all working. Here's a breakdown of what I was seeing
and my hypothesis.
*Console Errors:*
* Incorrect MIME type --> `css` files being set as `text/html` type.
* 500/502 Errors when trying to load javascript files
* 500 Errors when trying to load child pages.
*Nginx Log Errors for this server:*
* `[error] 1147432#1147432: *84013 invalid URL prefix in "://:/favicon-16x16.png"`
* `[warn] 1147432#1147432: *84013 using uninitialized "port" variable`
*Nginx `error.log` errors:*
* `[error] 1118832#1118832: *77105 directory index of "/var/www/html/" is forbidden`
I thought I had tried everything, but it was a rip and replace from a single blog post that solved it for me. Some of the
things I tried include the following. _Note: when I mention 'nginx config file' below, I am referring to the specific file
for this subdomain. I have a single global nginx.conf and then individual files for each subdomain/proxy host.
* Editing `index.html` to ensure that any referenced file had an explicit mime type associated with it.
* Included `include { full path }/mime.types` in the specific nginx config file.
* Included specific `location ~ \.(css|js)$ {` sections in my nginx config file.
* Tried assigning the `$forward_scheme`, `$host`, and `$port` variables (similar to a reverse proxy host).
* Removing any SSL references <-- This caused similar behavior but different errors! I thought I was making progress...🫥
* Switched out the variables of `root` and `alias` between my `server` and `location` blocks.
* Started with something super simple, such as the suggestions from [Gideon Wolfe's Block](https://gideonwolfe.com/posts/sysadmin/hugonginx/).
If you clicked on the link I just shared, you'll see that Gideon's setup is quite similar to the one that I finally got to
work. My thought there is that my errors were less about the nginx config setup from within the file, and instead it's very
possible that I set incorrect directory permissions after transferring all the public files to the web server. Gideon's blog
was the very first I clicked on, so I owe them my thanks since their site was the entry point to figuring all this out!
You can find a list of all the blogs I stumbled upon in this weird and fluctuating journey of doing something as simple as
sharing my static files on an nginx web server.
In the end, [newbs.rocks blog post](https://newbs.rocks/posts/hugo-setup/) on setting up Hugo with nginx provided me a config
example that worked for my setup. I think part of what happened was that as I was cycling through all the blog posts and
StackOverflow posts, I would remove one or two lines (usually the one or two I changed from the previous post's
recommendations) but in doing that, was making more of a mess for myself, burying the error even more deeply. By replacing
everything, I've brought it back to a manageable place.
You'll also notice in my [final config file]({{<ref "hosting_hugo_troubles.md#nginx-config">}}), I was able to add back in the [Authelia](https://www.authelia.com/) snippets, paths for the SSL certs, and a few other items that connect nginx to the rest of my infrastructure.
If you've stumbled upon this, I hope it helps you figure out your Hugo/Nginx issues! I definitely saw a lot of people posting
in Hugo's Discourse asking about [mime type errors](https://discourse.gohugo.io/search?expanded=true&q=mime%20type), so it is
very likely that whatever you're facing isn't isolated to just you.
Now that I have this up and running, I need to write (and post!) a script that will pull from my repo, change directory
ownership, and reload nginx.
### Working nginx config file {#nginx-config}
```config
# ------------------------------------------------------------
# selfhosted.rsmsn.co
# ------------------------------------------------------------
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name selfhosted.rsmsn.co;
root /var/www/html/public/;
index /index.html;
# Force SSL
include conf.d/include/force-ssl.conf;
# Custom SSL
ssl_certificate custom_ssl/npm-3/fullchain.pem;
ssl_certificate_key custom_ssl/npm-3/privkey.pem;
access_log /var/log/nginx/blog.log combined;
error_log /var/log/nginx/blog_error.log warn;
include snippets/authelia-location.conf;
location / {
try_files $uri $uri/ =404;
include snippets/authelia-authrequest.conf;
}
}
```
### Blogs and Sites I used
* [Gideon Wolfe - Deploying a static Hugo site with NGINX](https://gideonwolfe.com/posts/sysadmin/hugonginx/)
* [Pvera - Deploying a simple static website using Nginx and Hugo](https://pvera.net/posts/create-site-nginx-hugo/)
* [Hugo Support thread on Discourse](https://discourse.gohugo.io/t/help-deploying-with-nginx/12609)
* [BravosLab - Static website with Hugo and Nginx](https://bravoslab.com/post/static-website-wirh-hugo-io-and-ngnix/)
* [Cavelab - Hugo Build deploy to Nginx](https://blog.cavelab.dev/2021/02/hugo-build-deploy-to-nginx/)
* [River - Serving Hugo from a non-root location with Nginx](https://river.me/blog/hugo-non-root-location/)

View File

@ -1,56 +0,0 @@
[params]
[params.site]
faviconUrl = ""
localCss = []
externalCss = []
localJs = []
externalJs = []
[params.header]
title = "My New Hugo Site"
subtitle = "A Site Built by Hugo"
[params.header.logo]
imgUrl = ""
logoLink = ""
[params.footer]
copyrightStr = "All Rights Reserved ®."
counter = true
language = true
hugoVersion = true
theme = true
modifiedTime = true
dateFormat = "Jan 02 2006 15:04:05"
gitHash = true
[params.footer.socialLink]
github = ""
facebook = ""
twitter = ""
email = ""
linkedin = ""
instagram = ""
telegram = ""
medium = ""
vimeo = ""
youtube = ""
[params.globalFrontmatter]
author = "Jing Wang"
description = "This is my new hugo site"
keywords = "hugo,site,new"
[params.homePage]
siteLongDescription = "Hugo is a fast and easy-to-use static website generator written in Go. It renders a complete HTML website from content and templates in a directory, utilizing Markdown files for metadata. It's optimized for speed and suitable for various website types."
siteLongDescriptionTitle = "Start"
showRecentPostsBlock = true
numOfRecentPosts = 5
recentPostShowUrl = true
[params.page]
includeToc = true
showAuthor = true
showDate = true
dateFormat = "2006.01.02"
showTimeToRead = true
showBreadcrumb = true

View File

@ -1,26 +0,0 @@
baseURL = 'https://selfhosted.rsmsn.co/'
relativeURLs = true
languageCode = 'en-us'
title = 'Rsmsn Blog'
subtitle = 'A mostly technical blog & series of experiences working in tech and my homelab'
theme = 'terminal'
themesDir = './themes/'
[params]
dateFormat = "02 Jan 2006"
[params.globalFrontmatter]
author = "Norm Rasmussen"
description = "A blog site about my homelab journey, command line commands to remember, and other thoughts around technology."
keywords = "cli,tech,site,blog,homelab,selfhosted,self-hosted"
[params.page]
includeToc = true
showAuthor = true
showDate = true
showTimeToRead = true
showBreadcrumb = true
[mediaTypes]
[mediaTypes."application/javascript"]
suffixes = ["js","jsm","mjs"]

21
hugo.yaml Normal file
View File

@ -0,0 +1,21 @@
baseURL: '/'
uglyURLs: true
relativeURLs: true
languageCode: 'en-us'
title: 'Rsmsn Blog'
subtitle: 'A mostly technical blog & series of experiences working in tech and my homelab'
theme: "PaperMod"
themesDir: './themes/'
paginate: 7
params:
env: production
title: RsmsnBlog
description: "A site to share self hosted tutorials, troubleshooting, and tips/tricks."
keywords: [Blog, Website, Resume, Interests, Portfolio]
author: Norm Rasmussen
DateFormat: "January 2, 2006"
defaultTheme: dark
assets:
favicon: "static/favicon.ico"
favicon32x32: "static/favicon.ico"

View File

@ -1,132 +1,153 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>404 Page not found :: Rsmsn Blog</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="" />
<meta name="keywords" content="" />
<html lang="en" dir="auto">
<meta name="robots" content="noodp" />
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>404 Page not found | Rsmsn Blog</title>
<meta name="keywords" content="">
<meta name="description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks.">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="./404.html">
<link crossorigin="anonymous" href="./assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="./static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="./static/favicon.ico">
<link rel="apple-touch-icon" href="./apple-touch-icon.png">
<link rel="mask-icon" href="./safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
<link rel="canonical" href="https://selfhosted.rsmsn.co/404.html" />
<link rel="stylesheet" href="https://selfhosted.rsmsn.co/styles.css">
<link rel="shortcut icon" href="https://selfhosted.rsmsn.co/img/theme-colors/orange.png">
<link rel="apple-touch-icon" href="https://selfhosted.rsmsn.co/img/theme-colors/orange.png">
<meta name="twitter:card" content="summary" />
<meta property="og:locale" content="en" />
</style>
</noscript><meta property="og:title" content="404 Page not found" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:title" content="404 Page not found">
<meta property="og:description" content="" />
<meta property="og:url" content="https://selfhosted.rsmsn.co/404.html" />
<meta property="og:site_name" content="Rsmsn Blog" />
<meta property="og:image" content="img/favicon/%!s().png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
<meta property="og:url" content="/404.html" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="404 Page not found"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
</head>
<body class="">
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
<div class="container headings--one-size">
</script>
<header class="header">
<div class="header__inner">
<div class="header__logo">
<a href="https://selfhosted.rsmsn.co/">
<div class="logo">
Terminal
</div>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="./" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<div class="not-found">404</div>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="./">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
</div>
</div>
</header>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
<div class="content">
<div class="post">
<h1 class="post-title">404 — Page not found...</h1>
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
<div class="post-content">
<a href="https://selfhosted.rsmsn.co/">Back to home page&nbsp;</a>
</div>
</div>
</div>
<footer class="footer">
<div class="footer__inner">
<div class="copyright">
<span>© 2023 Powered by <a href="https://gohugo.io">Hugo</a></span>
<span>:: <a href="https://github.com/panr/hugo-theme-terminal" target="_blank">Theme</a> made by <a href="https://github.com/panr" target="_blank">panr</a></span>
</div>
</div>
</footer>
<script type="text/javascript" src="./bundle.min.js"></script>
</div>
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

159
public/categories.html Normal file
View File

@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en" dir="auto">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>Categories | Rsmsn Blog</title>
<meta name="keywords" content="">
<meta name="description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks.">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="./categories.html">
<link crossorigin="anonymous" href="./assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="./static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="./static/favicon.ico">
<link rel="apple-touch-icon" href="./apple-touch-icon.png">
<link rel="mask-icon" href="./safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="./categories/index.xml">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
</noscript><meta property="og:title" content="Categories" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:url" content="/categories.html" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Categories"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
</head>
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="./" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<header class="page-header">
<h1>Categories</h1>
</header>
<ul class="terms-tags">
</ul>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="./">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Categories on Rsmsn Blog</title>
<link>https://selfhosted.rsmsn.co/categories/</link>
<link>/categories.html</link>
<description>Recent content in Categories on Rsmsn Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language><atom:link href="https://selfhosted.rsmsn.co/categories/index.xml" rel="self" type="application/rss+xml" />
<language>en-us</language><atom:link href="/categories/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,182 +1,192 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" dir="auto">
<head>
<meta name="generator" content="Hugo 0.118.2">
<title>Rsmsn Blog</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="generator" content="Hugo 0.118.2"><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>Rsmsn Blog</title>
<meta name="keywords" content="Blog, Website, Resume, Interests, Portfolio">
<meta name="description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks.">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="./">
<link crossorigin="anonymous" href="./assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="./static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="./static/favicon.ico">
<link rel="apple-touch-icon" href="./apple-touch-icon.png">
<link rel="mask-icon" href="./safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="./index.xml">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
<meta name="robots" content="noodp" />
<link rel="canonical" href="https://selfhosted.rsmsn.co/" />
<link rel="stylesheet" href="https://selfhosted.rsmsn.co/styles.css">
<link rel="shortcut icon" href="https://selfhosted.rsmsn.co/img/theme-colors/orange.png">
<link rel="apple-touch-icon" href="https://selfhosted.rsmsn.co/img/theme-colors/orange.png">
<meta name="twitter:card" content="summary" />
<meta property="og:locale" content="en" />
</style>
</noscript><meta property="og:title" content="Rsmsn Blog" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:title" content="Rsmsn Blog">
<meta property="og:description" content="" />
<meta property="og:url" content="https://selfhosted.rsmsn.co/" />
<meta property="og:site_name" content="Rsmsn Blog" />
<meta property="og:image" content="img/favicon/%!s().png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
<link href="./index.xml" rel="alternate" type="application/rss+xml" title="Rsmsn Blog" />
<meta property="og:url" content="/" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Rsmsn Blog"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Rsmsn Blog",
"url": "/",
"description": "A site to share self hosted tutorials, troubleshooting, and tips/tricks.",
"thumbnailUrl": "/static/favicon.ico",
"sameAs": [
]
}
</script>
</head>
<body class="">
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
<div class="container headings--one-size">
</script>
<header class="header">
<div class="header__inner">
<div class="header__logo">
<a href="https://selfhosted.rsmsn.co/">
<div class="logo">
Terminal
<header class="header">
<nav class="nav">
<div class="logo">
<a href="./" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<article class="first-entry">
<header class="entry-header">
<h2>Trouble Hosting Hugo with Nginx
</h2>
</header>
<div class="entry-content">
<p>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and Im happy to share some reverse proxy nginx config files....</p>
</div>
<footer class="entry-footer"><span title='2023-09-20 11:33:22 -0400 EDT'>September 20, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Trouble Hosting Hugo with Nginx" href="./posts/hosting_hugo_troubles.html"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>Tutorial: Move from NginxProxyManager to Nginx
</h2>
</header>
<div class="entry-content">
<p>A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition....</p>
</div>
<footer class="entry-footer"><span title='2023-08-05 15:23:51 -0500 -0500'>August 5, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Tutorial: Move from NginxProxyManager to Nginx" href="./posts/npm_to_nginx_tutorial.html"></a>
</article>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="./">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
</div>
</div>
</header>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
<div class="content">
<div class="posts">
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
<article class="post on-list">
<h1 class="post-title">
<a href="https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/">Tutorial: Move from NginxProxyManager to Nginx</a>
</h1>
<div class="post-meta"><time class="post-date">2023-08-05</time></div>
<span class="post-tags">
#<a href="https://selfhosted.rsmsn.co/tags/tutorial/">tutorial</a>&nbsp;
#<a href="https://selfhosted.rsmsn.co/tags/self-hosted/">self-hosted</a>&nbsp;
</span>
<div class="post-content">
A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition.
</div>
<div>
<a class="read-more button" href="./posts/npm_to_nginx_tutorial/"></a>
</div>
</article>
<div class="pagination">
<div class="pagination__buttons">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="footer__inner">
<div class="copyright">
<span>© 2023 Powered by <a href="https://gohugo.io">Hugo</a></span>
<span>:: <a href="https://github.com/panr/hugo-theme-terminal" target="_blank">Theme</a> made by <a href="https://github.com/panr" target="_blank">panr</a></span>
</div>
</div>
</footer>
<script type="text/javascript" src="./bundle.min.js"></script>
</div>
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

View File

@ -1,280 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Rsmsn Blog</title>
<link>https://selfhosted.rsmsn.co/</link>
<link>/</link>
<description>Recent content on Rsmsn Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 05 Aug 2023 15:23:51 -0500</lastBuildDate><atom:link href="https://selfhosted.rsmsn.co/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Wed, 20 Sep 2023 11:33:22 -0400</lastBuildDate><atom:link href="/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Trouble Hosting Hugo with Nginx</title>
<link>/posts/hosting_hugo_troubles.html</link>
<pubDate>Wed, 20 Sep 2023 11:33:22 -0400</pubDate>
<guid>/posts/hosting_hugo_troubles.html</guid>
<description>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and I&amp;rsquo;m happy to share some reverse proxy nginx config files.</description>
</item>
<item>
<title>Tutorial: Move from NginxProxyManager to Nginx</title>
<link>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</link>
<link>/posts/npm_to_nginx_tutorial.html</link>
<pubDate>Sat, 05 Aug 2023 15:23:51 -0500</pubDate>
<guid>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</guid>
<guid>/posts/npm_to_nginx_tutorial.html</guid>
<description>A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition.</description>
<content>&lt;p&gt;A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for &lt;a href=&#34;https://www.reddit.com/r/selfhosted/comments/15j4v80/minitutorial_migrating_from_nginx_proxy_manager/&#34;&gt;this reddit
post&lt;/a&gt; and to post this &lt;a href=&#34;https://github.com/Normanras/Npm_to_Nginx&#34;&gt;my Github profile&lt;/a&gt;. Thought my website would also be a good place to share it for any passers-by.&lt;/p&gt;
&lt;h2 id=&#34;goal&#34;&gt;Goal&lt;/h2&gt;
&lt;p&gt;To give clear instructions to help users migrate from using &lt;a href=&#34;https://nginxproxymanager.com/&#34;&gt;Nginx Proxy Manager&lt;/a&gt; (NPM) to standard &lt;a href=&#34;https://docs.nginx.com/&#34;&gt;Nginx&lt;/a&gt;. This tutorial is not exhaustive and there are many other implementations of this transition. I would recommend checking out the many Nginx &lt;a href=&#34;http://nginx.org/en/docs/&#34;&gt;Documentation Sites&lt;/a&gt; and tutorials to learn more.&lt;/p&gt;
&lt;h3 id=&#34;introduction&#34;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;If you&amp;rsquo;re anything like me and you got into the self-hosted/homelab/diy game sometime within the last 5 years, you&amp;rsquo;ve likely been recommended to use Nginx Proxy Manager as one of the choice Reverse Proxy services. If you&amp;rsquo;ve also been paying attention to various self-hosted communities, you may have also come across Christian Lempa&amp;rsquo;s Video on &lt;a href=&#34;https://youtu.be/uaixCKTaqY0&#34;&gt;trusting smaller self hosted projects and tools&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Spoilers:&lt;/em&gt; He roasts NPM in his video and towards the end says he won&amp;rsquo;t be using NPM anymore. He also, perhaps purposely, doesn&amp;rsquo;t share which tool he will be migrating to.&lt;/p&gt;
&lt;p&gt;Whether you follow Christian away from NPM or not, it dawned on me that while NPM is using a very trusted web server and reverse proxy under the hood, I hadn&amp;rsquo;t taken the time to understand how an Nginx Config actually worked. Since NPM was already creating most of the files for Nginx, I got to reading through all the files and reworking them so that I could begin using Nginx without the NPM gui.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Contributing: This is not all encompassing of Nginx possibilities. Including instructions for various installation methods, using OpenResty, and any other migrations or use cases would help the community. If you&amp;rsquo;d like to add in additional information on how to migrate from NPM to Nginx, that is welcome. Simply submit a PR with your steps.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;tldr---quick-steps&#34;&gt;TL;DR - Quick Steps&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following contents (including sub-directories) from the NPM &lt;code&gt;/data/nginx&lt;/code&gt; directory to the Nginx &lt;code&gt;/etc/nginx&lt;/code&gt; folder:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;proxy_hosts&lt;/code&gt; &amp;gt; &lt;code&gt;sites-available&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;conf.d&lt;/code&gt; &amp;gt; &lt;code&gt;conf.d&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;snippets&lt;/code&gt; &amp;gt; &lt;code&gt;snippets&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;custom_ssl&lt;/code&gt; &amp;gt; &lt;code&gt;custom_ssl&lt;/code&gt; (if applicable)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit each file in your &lt;code&gt;sites-available&lt;/code&gt; directory and update the paths. Most will change from &lt;code&gt;/data/nginx/&lt;/code&gt; to &lt;code&gt;/etc/nginx&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit your &lt;code&gt;nginx.conf&lt;/code&gt; file and ensure the following two paths are there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include /etc/nginx/conf.d/*.conf;&lt;/code&gt; and &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Symlink the proxy host files in &lt;code&gt;sites-available&lt;/code&gt; to &lt;code&gt;sites-enabled&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ln -s * ./sites-enabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test your changes with &lt;code&gt;nginx -t&lt;/code&gt;. Make appropriate changes if there are error messages.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;pre-requisites--assumptions&#34;&gt;Pre-requisites &amp;amp; Assumptions&lt;/h3&gt;
&lt;p&gt;I am using an Ubuntu VM with NPM and it&amp;rsquo;s db as a Docker Container while Nginx is installed natively on the machine. You don&amp;rsquo;t have to use this setup exactly, but I am making a few assumptions as to what you should have access to before you begin. I am also using custom SSL certs, but theoretically, the transition should be the same when using Lets Encrypt.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve added some example files to show before and after changes to this repo and outlined file trees below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You understand the basics of what a Reverse Proxy is doing and are sticking with some stock settings (like exposing port 80 an 443).&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;ve installed &lt;a href=&#34;https://nginxproxymanager.com/setup/&#34;&gt;NPM&lt;/a&gt; and &lt;a href=&#34;https://www.nginx.com/resources/wiki/start/topics/tutorials/install/&#34;&gt;Nginx&lt;/a&gt; using your preferred method.&lt;/li&gt;
&lt;li&gt;You have access to both NPMs file tree and Nginx&amp;rsquo;s.&lt;/li&gt;
&lt;li&gt;If using NPM in docker, make sure you&amp;rsquo;ve mapped a local volume on the host to the container.&lt;/li&gt;
&lt;li&gt;My setup using docker-compose is the following: &lt;code&gt;/user/nginx/data:/data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Know where your Nginx files are. If using docker, same as above, make sure your container directories are mapped to the host.&lt;/li&gt;
&lt;li&gt;For a linux install, they should be accessible at &lt;code&gt;/etc/nginx&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You know how to edit files at the command line using &lt;code&gt;nano&lt;/code&gt;, &lt;code&gt;vi&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;, &lt;code&gt;neovim&lt;/code&gt;, &lt;code&gt;emacs&lt;/code&gt;, or something else.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;nginx-files&#34;&gt;Nginx Files&lt;/h3&gt;
&lt;p&gt;Nginx uses the &lt;code&gt;nginx.conf&lt;/code&gt; file and within that file, it will include your proxy files. These exist under &lt;code&gt;./nginx/sites-enabled/&lt;/code&gt;. In the main &lt;code&gt;nginx.conf&lt;/code&gt; file, the line &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt; will bring in those files to the config file, making the proxies accessible.&lt;/p&gt;
&lt;h3 id=&#34;how-to-transition---detailed-version&#34;&gt;How to Transition - Detailed Version&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Since NPM uses Nginx under the hood, they are both, by default, going to try and use ports 80 and 443 to serve up your apps and content. Turn off both systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Docker: &lt;code&gt;docker stop [app_container, db_container]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Systemd: &lt;code&gt;systemctl stop nginx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy your &lt;code&gt;proxy_host&lt;/code&gt; (NPM) files to the &lt;code&gt;sites-available&lt;/code&gt; (Nginx) folder.
&lt;code&gt;cp -r /user/nginx/data/nginx/proxy_hosts/* /etc/nginx/sites-available/&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Nginx doesn&amp;rsquo;t really care what the files are called, but NPM numbers them based on the order in which you added them in the GUI. I find it better to rename them to what service they actually serve up for easier identification later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy your &lt;code&gt;custom_ssl&lt;/code&gt; folder from NPM to the &lt;code&gt;custom_ssl&lt;/code&gt; folder in Nginx. See the following step for the various default paths in both systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/custom_ssl/* /etc/nginx/custom_ssl/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the &lt;code&gt;conf.d&lt;/code&gt; folder from NPM to the &lt;code&gt;conf.d&lt;/code&gt; folder in Nginx. &lt;em&gt;Note: For some reason, not all of the files in
the proxy files were actually in my &lt;code&gt;conf.d&lt;/code&gt; directory. If you&amp;rsquo;re missing any files, please download and/or copy and
paste them from the &lt;a href=&#34;https://github.com/NginxProxyManager/nginx-proxy-manager/tree/fa851b61da3fe3726d1a04c25e69d36e79edea2d/docker/rootfs/etc/nginx/conf.d/include&#34;&gt;NPM Repo&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/nginx/conf.d /etc/nginx/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you had any additional files included in the Advanced section of an NPM Proxy Host, make sure you copy them over. For my setup and this tutorial, they were all located in the &lt;code&gt;snippets&lt;/code&gt; directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/nginx/snippets/* /etc/nginx/snippets/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are a number of lines that need to be updated in each proxy configuration file to make them work with Nginx. I&amp;rsquo;ve placed additional comments in &lt;a href=&#34;./proxy_host/npm_proxy.conf&#34;&gt;&lt;code&gt;./proxy_host/npm_proxy.conf&lt;/code&gt;&lt;/a&gt; file. The line changes are the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Custom SSL path:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPM path: &lt;code&gt;/data/custom_ssl...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Nginx path: &lt;code&gt;/etc/nginx/custom_ssl...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;conf.d:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The paths should remain the same. However, if you changed the path for &lt;code&gt;conf.d&lt;/code&gt; in Nginx and differed in step 5, above, make sure you use the correct path.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access &amp;amp; Error Logs&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPM path: &lt;code&gt;/data/logs/...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Nginx path: &lt;code&gt;/var/log/nginx/...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Double Check all your paths! If this is your first time using Nginx, make sure every directory is correct! Save your work.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the &lt;code&gt;nginx.conf&lt;/code&gt; file which is located at &lt;code&gt;/etc/nginx/&lt;/code&gt;. You can see the one I am using in this repo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make sure that you have the following two lines in the main conf file and that they are pointing to the appropriate directories in the nginx directory path.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include /etc/nginx/conf.d/*.conf;&lt;/code&gt; and &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You&amp;rsquo;ll notice that you ensured there was a &lt;code&gt;sites-enabled&lt;/code&gt; directory in the configuration file, but you changed all your proxy host config files in &lt;code&gt;sites-available&lt;/code&gt;! Good eye, all that&amp;rsquo;s left is to symlink the files to &lt;code&gt;sites-enabled&lt;/code&gt; so that nginx can start using them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To symlink the available proxy files run the following command within the &lt;code&gt;sites-available&lt;/code&gt; directory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ln -s * ./sites-enabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you&amp;rsquo;re confident that you&amp;rsquo;ve done all the above correctly, you can test your setup using nginx command and flags. While in the directory with your &lt;code&gt;nginx.conf&lt;/code&gt; file - usually &lt;code&gt;/etc/nginx&lt;/code&gt; - run the following command: &lt;code&gt;nginx -t&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If all is working as expected you should see the below output. If it returns any errors, fix them appropriately. It will usually tell you what line is throwing the error. In this case, there&amp;rsquo;s a high likelihood that it will be path error.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx: configuration file /etc/nginx/nginx.conf test is successful
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it! You can now restart your nginx service on the host and access all your sites just as if you were using Nginx Proxy Manager! Make sure you take a look at your logs and system&amp;rsquo;s status should nginx fail to start.&lt;/p&gt;
&lt;h3 id=&#34;additional-informationappendix&#34;&gt;Additional Information/Appendix&lt;/h3&gt;
&lt;h4 id=&#34;file-trees-for-npm-in-container-and-nginx-on-host&#34;&gt;File Trees for NPM (in container) and Nginx (on host)&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;I did not expand every directory in these trees. Only the ones that are pertinent for reference in this tutorial.&lt;/em&gt;&lt;/p&gt;
&lt;h4 id=&#34;nginx&#34;&gt;NGINX&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── conf.d
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── include
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── assets.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── block-exploits.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── force-ssl.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── ip_ranges.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── resolvers.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── custom_ssl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── npm-1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── npm-2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── npm-3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── fastcgi.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── fastcgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── koi-utf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── koi-win
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── mime.types
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── modules-available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── modules-enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── nginx.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── proxy_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── scgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── sites-available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── auth.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── bitwarden.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── codehub.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default.backup
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── files.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── notes.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── photos.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── rsmsn-root.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── wordle.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── wordle-it.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── sites-enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── auth.conf -&amp;gt; /etc/nginx/sites-available/auth.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── bitwarden.conf -&amp;gt; /etc/nginx/sites-available/bitwarden.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── codehub.conf -&amp;gt; /etc/nginx/sites-available/codehub.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── files.conf -&amp;gt; /etc/nginx/sites-available/files.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── notes.conf -&amp;gt; /etc/nginx/sites-available/notes.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── photos.conf -&amp;gt; /etc/nginx/sites-available/photos.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── wordle.conf -&amp;gt; /etc/nginx/sites-available/wordle.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── wordle-it.conf -&amp;gt; /etc/nginx/sites-available/wordle-it.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── snippets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── fastcgi-php.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── snakeoil.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── uwsgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── win-utf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;npm&#34;&gt;NPM&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── access
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── custom_ssl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── npm-1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── npm-2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── npm-3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── keys.json
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── letsencrypt-acme-challenge
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── logs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── mysql
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── nginx
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── custom
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dead_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default_www
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dummycert.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dummykey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 10.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 11.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 12.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 13.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 15.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 1.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 2.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 4.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 5.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── 6.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── redirection_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── snippets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── stream
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── temp
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── docker-compose.yml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── letsencrypt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── renewal-hooks
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
</item>
</channel>

10
public/page/1.html Normal file
View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>/</title>
<link rel="canonical" href="../">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=../">
</head>
</html>

198
public/posts.html Normal file
View File

@ -0,0 +1,198 @@
<!DOCTYPE html>
<html lang="en" dir="auto">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>Posts | Rsmsn Blog</title>
<meta name="keywords" content="">
<meta name="description" content="Posts - Rsmsn Blog">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="./posts.html">
<link crossorigin="anonymous" href="./assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="./static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="./static/favicon.ico">
<link rel="apple-touch-icon" href="./apple-touch-icon.png">
<link rel="mask-icon" href="./safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="./posts/index.xml">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
</noscript><meta property="og:title" content="Posts" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:url" content="/posts.html" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Posts"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1 ,
"name": "Posts",
"item": "/posts.html"
}
]
}
</script>
</head>
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="./" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<header class="page-header">
<h1>
Posts
</h1>
</header>
<article class="post-entry">
<header class="entry-header">
<h2>Trouble Hosting Hugo with Nginx
</h2>
</header>
<div class="entry-content">
<p>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and Im happy to share some reverse proxy nginx config files....</p>
</div>
<footer class="entry-footer"><span title='2023-09-20 11:33:22 -0400 EDT'>September 20, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Trouble Hosting Hugo with Nginx" href="./posts/hosting_hugo_troubles.html"></a>
</article>
<article class="post-entry">
<header class="entry-header">
<h2>Tutorial: Move from NginxProxyManager to Nginx
</h2>
</header>
<div class="entry-content">
<p>A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition....</p>
</div>
<footer class="entry-footer"><span title='2023-08-05 15:23:51 -0500 -0500'>August 5, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Tutorial: Move from NginxProxyManager to Nginx" href="./posts/npm_to_nginx_tutorial.html"></a>
</article>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="./">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -1,280 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<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 Rsmsn Blog</title>
<link>https://selfhosted.rsmsn.co/posts/</link>
<link>/posts.html</link>
<description>Recent content in Posts on Rsmsn Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 05 Aug 2023 15:23:51 -0500</lastBuildDate><atom:link href="https://selfhosted.rsmsn.co/posts/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Wed, 20 Sep 2023 11:33:22 -0400</lastBuildDate><atom:link href="/posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Trouble Hosting Hugo with Nginx</title>
<link>/posts/hosting_hugo_troubles.html</link>
<pubDate>Wed, 20 Sep 2023 11:33:22 -0400</pubDate>
<guid>/posts/hosting_hugo_troubles.html</guid>
<description>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and I&amp;rsquo;m happy to share some reverse proxy nginx config files.</description>
</item>
<item>
<title>Tutorial: Move from NginxProxyManager to Nginx</title>
<link>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</link>
<link>/posts/npm_to_nginx_tutorial.html</link>
<pubDate>Sat, 05 Aug 2023 15:23:51 -0500</pubDate>
<guid>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</guid>
<guid>/posts/npm_to_nginx_tutorial.html</guid>
<description>A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition.</description>
<content>&lt;p&gt;A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for &lt;a href=&#34;https://www.reddit.com/r/selfhosted/comments/15j4v80/minitutorial_migrating_from_nginx_proxy_manager/&#34;&gt;this reddit
post&lt;/a&gt; and to post this &lt;a href=&#34;https://github.com/Normanras/Npm_to_Nginx&#34;&gt;my Github profile&lt;/a&gt;. Thought my website would also be a good place to share it for any passers-by.&lt;/p&gt;
&lt;h2 id=&#34;goal&#34;&gt;Goal&lt;/h2&gt;
&lt;p&gt;To give clear instructions to help users migrate from using &lt;a href=&#34;https://nginxproxymanager.com/&#34;&gt;Nginx Proxy Manager&lt;/a&gt; (NPM) to standard &lt;a href=&#34;https://docs.nginx.com/&#34;&gt;Nginx&lt;/a&gt;. This tutorial is not exhaustive and there are many other implementations of this transition. I would recommend checking out the many Nginx &lt;a href=&#34;http://nginx.org/en/docs/&#34;&gt;Documentation Sites&lt;/a&gt; and tutorials to learn more.&lt;/p&gt;
&lt;h3 id=&#34;introduction&#34;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;If you&amp;rsquo;re anything like me and you got into the self-hosted/homelab/diy game sometime within the last 5 years, you&amp;rsquo;ve likely been recommended to use Nginx Proxy Manager as one of the choice Reverse Proxy services. If you&amp;rsquo;ve also been paying attention to various self-hosted communities, you may have also come across Christian Lempa&amp;rsquo;s Video on &lt;a href=&#34;https://youtu.be/uaixCKTaqY0&#34;&gt;trusting smaller self hosted projects and tools&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Spoilers:&lt;/em&gt; He roasts NPM in his video and towards the end says he won&amp;rsquo;t be using NPM anymore. He also, perhaps purposely, doesn&amp;rsquo;t share which tool he will be migrating to.&lt;/p&gt;
&lt;p&gt;Whether you follow Christian away from NPM or not, it dawned on me that while NPM is using a very trusted web server and reverse proxy under the hood, I hadn&amp;rsquo;t taken the time to understand how an Nginx Config actually worked. Since NPM was already creating most of the files for Nginx, I got to reading through all the files and reworking them so that I could begin using Nginx without the NPM gui.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Contributing: This is not all encompassing of Nginx possibilities. Including instructions for various installation methods, using OpenResty, and any other migrations or use cases would help the community. If you&amp;rsquo;d like to add in additional information on how to migrate from NPM to Nginx, that is welcome. Simply submit a PR with your steps.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;tldr---quick-steps&#34;&gt;TL;DR - Quick Steps&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following contents (including sub-directories) from the NPM &lt;code&gt;/data/nginx&lt;/code&gt; directory to the Nginx &lt;code&gt;/etc/nginx&lt;/code&gt; folder:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;proxy_hosts&lt;/code&gt; &amp;gt; &lt;code&gt;sites-available&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;conf.d&lt;/code&gt; &amp;gt; &lt;code&gt;conf.d&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;snippets&lt;/code&gt; &amp;gt; &lt;code&gt;snippets&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;custom_ssl&lt;/code&gt; &amp;gt; &lt;code&gt;custom_ssl&lt;/code&gt; (if applicable)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit each file in your &lt;code&gt;sites-available&lt;/code&gt; directory and update the paths. Most will change from &lt;code&gt;/data/nginx/&lt;/code&gt; to &lt;code&gt;/etc/nginx&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit your &lt;code&gt;nginx.conf&lt;/code&gt; file and ensure the following two paths are there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include /etc/nginx/conf.d/*.conf;&lt;/code&gt; and &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Symlink the proxy host files in &lt;code&gt;sites-available&lt;/code&gt; to &lt;code&gt;sites-enabled&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ln -s * ./sites-enabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test your changes with &lt;code&gt;nginx -t&lt;/code&gt;. Make appropriate changes if there are error messages.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;pre-requisites--assumptions&#34;&gt;Pre-requisites &amp;amp; Assumptions&lt;/h3&gt;
&lt;p&gt;I am using an Ubuntu VM with NPM and it&amp;rsquo;s db as a Docker Container while Nginx is installed natively on the machine. You don&amp;rsquo;t have to use this setup exactly, but I am making a few assumptions as to what you should have access to before you begin. I am also using custom SSL certs, but theoretically, the transition should be the same when using Lets Encrypt.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve added some example files to show before and after changes to this repo and outlined file trees below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You understand the basics of what a Reverse Proxy is doing and are sticking with some stock settings (like exposing port 80 an 443).&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;ve installed &lt;a href=&#34;https://nginxproxymanager.com/setup/&#34;&gt;NPM&lt;/a&gt; and &lt;a href=&#34;https://www.nginx.com/resources/wiki/start/topics/tutorials/install/&#34;&gt;Nginx&lt;/a&gt; using your preferred method.&lt;/li&gt;
&lt;li&gt;You have access to both NPMs file tree and Nginx&amp;rsquo;s.&lt;/li&gt;
&lt;li&gt;If using NPM in docker, make sure you&amp;rsquo;ve mapped a local volume on the host to the container.&lt;/li&gt;
&lt;li&gt;My setup using docker-compose is the following: &lt;code&gt;/user/nginx/data:/data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Know where your Nginx files are. If using docker, same as above, make sure your container directories are mapped to the host.&lt;/li&gt;
&lt;li&gt;For a linux install, they should be accessible at &lt;code&gt;/etc/nginx&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You know how to edit files at the command line using &lt;code&gt;nano&lt;/code&gt;, &lt;code&gt;vi&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;, &lt;code&gt;neovim&lt;/code&gt;, &lt;code&gt;emacs&lt;/code&gt;, or something else.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;nginx-files&#34;&gt;Nginx Files&lt;/h3&gt;
&lt;p&gt;Nginx uses the &lt;code&gt;nginx.conf&lt;/code&gt; file and within that file, it will include your proxy files. These exist under &lt;code&gt;./nginx/sites-enabled/&lt;/code&gt;. In the main &lt;code&gt;nginx.conf&lt;/code&gt; file, the line &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt; will bring in those files to the config file, making the proxies accessible.&lt;/p&gt;
&lt;h3 id=&#34;how-to-transition---detailed-version&#34;&gt;How to Transition - Detailed Version&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Since NPM uses Nginx under the hood, they are both, by default, going to try and use ports 80 and 443 to serve up your apps and content. Turn off both systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Docker: &lt;code&gt;docker stop [app_container, db_container]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Systemd: &lt;code&gt;systemctl stop nginx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy your &lt;code&gt;proxy_host&lt;/code&gt; (NPM) files to the &lt;code&gt;sites-available&lt;/code&gt; (Nginx) folder.
&lt;code&gt;cp -r /user/nginx/data/nginx/proxy_hosts/* /etc/nginx/sites-available/&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Nginx doesn&amp;rsquo;t really care what the files are called, but NPM numbers them based on the order in which you added them in the GUI. I find it better to rename them to what service they actually serve up for easier identification later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy your &lt;code&gt;custom_ssl&lt;/code&gt; folder from NPM to the &lt;code&gt;custom_ssl&lt;/code&gt; folder in Nginx. See the following step for the various default paths in both systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/custom_ssl/* /etc/nginx/custom_ssl/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the &lt;code&gt;conf.d&lt;/code&gt; folder from NPM to the &lt;code&gt;conf.d&lt;/code&gt; folder in Nginx. &lt;em&gt;Note: For some reason, not all of the files in
the proxy files were actually in my &lt;code&gt;conf.d&lt;/code&gt; directory. If you&amp;rsquo;re missing any files, please download and/or copy and
paste them from the &lt;a href=&#34;https://github.com/NginxProxyManager/nginx-proxy-manager/tree/fa851b61da3fe3726d1a04c25e69d36e79edea2d/docker/rootfs/etc/nginx/conf.d/include&#34;&gt;NPM Repo&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/nginx/conf.d /etc/nginx/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you had any additional files included in the Advanced section of an NPM Proxy Host, make sure you copy them over. For my setup and this tutorial, they were all located in the &lt;code&gt;snippets&lt;/code&gt; directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/nginx/snippets/* /etc/nginx/snippets/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are a number of lines that need to be updated in each proxy configuration file to make them work with Nginx. I&amp;rsquo;ve placed additional comments in &lt;a href=&#34;./proxy_host/npm_proxy.conf&#34;&gt;&lt;code&gt;./proxy_host/npm_proxy.conf&lt;/code&gt;&lt;/a&gt; file. The line changes are the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Custom SSL path:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPM path: &lt;code&gt;/data/custom_ssl...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Nginx path: &lt;code&gt;/etc/nginx/custom_ssl...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;conf.d:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The paths should remain the same. However, if you changed the path for &lt;code&gt;conf.d&lt;/code&gt; in Nginx and differed in step 5, above, make sure you use the correct path.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access &amp;amp; Error Logs&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPM path: &lt;code&gt;/data/logs/...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Nginx path: &lt;code&gt;/var/log/nginx/...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Double Check all your paths! If this is your first time using Nginx, make sure every directory is correct! Save your work.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the &lt;code&gt;nginx.conf&lt;/code&gt; file which is located at &lt;code&gt;/etc/nginx/&lt;/code&gt;. You can see the one I am using in this repo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make sure that you have the following two lines in the main conf file and that they are pointing to the appropriate directories in the nginx directory path.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include /etc/nginx/conf.d/*.conf;&lt;/code&gt; and &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You&amp;rsquo;ll notice that you ensured there was a &lt;code&gt;sites-enabled&lt;/code&gt; directory in the configuration file, but you changed all your proxy host config files in &lt;code&gt;sites-available&lt;/code&gt;! Good eye, all that&amp;rsquo;s left is to symlink the files to &lt;code&gt;sites-enabled&lt;/code&gt; so that nginx can start using them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To symlink the available proxy files run the following command within the &lt;code&gt;sites-available&lt;/code&gt; directory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ln -s * ./sites-enabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you&amp;rsquo;re confident that you&amp;rsquo;ve done all the above correctly, you can test your setup using nginx command and flags. While in the directory with your &lt;code&gt;nginx.conf&lt;/code&gt; file - usually &lt;code&gt;/etc/nginx&lt;/code&gt; - run the following command: &lt;code&gt;nginx -t&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If all is working as expected you should see the below output. If it returns any errors, fix them appropriately. It will usually tell you what line is throwing the error. In this case, there&amp;rsquo;s a high likelihood that it will be path error.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx: configuration file /etc/nginx/nginx.conf test is successful
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it! You can now restart your nginx service on the host and access all your sites just as if you were using Nginx Proxy Manager! Make sure you take a look at your logs and system&amp;rsquo;s status should nginx fail to start.&lt;/p&gt;
&lt;h3 id=&#34;additional-informationappendix&#34;&gt;Additional Information/Appendix&lt;/h3&gt;
&lt;h4 id=&#34;file-trees-for-npm-in-container-and-nginx-on-host&#34;&gt;File Trees for NPM (in container) and Nginx (on host)&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;I did not expand every directory in these trees. Only the ones that are pertinent for reference in this tutorial.&lt;/em&gt;&lt;/p&gt;
&lt;h4 id=&#34;nginx&#34;&gt;NGINX&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── conf.d
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── include
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── assets.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── block-exploits.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── force-ssl.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── ip_ranges.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── resolvers.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── custom_ssl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── npm-1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── npm-2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── npm-3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── fastcgi.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── fastcgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── koi-utf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── koi-win
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── mime.types
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── modules-available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── modules-enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── nginx.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── proxy_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── scgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── sites-available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── auth.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── bitwarden.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── codehub.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default.backup
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── files.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── notes.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── photos.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── rsmsn-root.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── wordle.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── wordle-it.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── sites-enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── auth.conf -&amp;gt; /etc/nginx/sites-available/auth.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── bitwarden.conf -&amp;gt; /etc/nginx/sites-available/bitwarden.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── codehub.conf -&amp;gt; /etc/nginx/sites-available/codehub.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── files.conf -&amp;gt; /etc/nginx/sites-available/files.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── notes.conf -&amp;gt; /etc/nginx/sites-available/notes.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── photos.conf -&amp;gt; /etc/nginx/sites-available/photos.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── wordle.conf -&amp;gt; /etc/nginx/sites-available/wordle.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── wordle-it.conf -&amp;gt; /etc/nginx/sites-available/wordle-it.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── snippets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── fastcgi-php.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── snakeoil.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── uwsgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── win-utf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;npm&#34;&gt;NPM&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── access
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── custom_ssl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── npm-1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── npm-2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── npm-3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── keys.json
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── letsencrypt-acme-challenge
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── logs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── mysql
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── nginx
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── custom
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dead_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default_www
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dummycert.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dummykey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 10.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 11.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 12.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 13.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 15.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 1.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 2.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 4.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 5.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── 6.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── redirection_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── snippets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── stream
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── temp
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── docker-compose.yml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── letsencrypt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── renewal-hooks
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
</item>
</channel>

File diff suppressed because one or more lines are too long

10
public/posts/page/1.html Normal file
View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>/posts.html</title>
<link rel="canonical" href="../../posts.html">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=../../posts.html">
</head>
</html>

BIN
public/rsmsncircles.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -2,24 +2,33 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://selfhosted.rsmsn.co/posts/</loc>
<loc>/posts.html</loc>
<lastmod>2023-09-20T11:33:22-04:00</lastmod>
</url><url>
<loc>/</loc>
<lastmod>2023-09-20T11:33:22-04:00</lastmod>
</url><url>
<loc>/tags/self-hosted.html</loc>
<lastmod>2023-09-20T11:33:22-04:00</lastmod>
</url><url>
<loc>/tags.html</loc>
<lastmod>2023-09-20T11:33:22-04:00</lastmod>
</url><url>
<loc>/tags/tips-tricks.html</loc>
<lastmod>2023-09-20T11:33:22-04:00</lastmod>
</url><url>
<loc>/posts/hosting_hugo_troubles.html</loc>
<lastmod>2023-09-20T11:33:22-04:00</lastmod>
</url><url>
<loc>/tags/troubleshooting.html</loc>
<lastmod>2023-09-20T11:33:22-04:00</lastmod>
</url><url>
<loc>/tags/tutorial.html</loc>
<lastmod>2023-08-05T15:23:51-05:00</lastmod>
</url><url>
<loc>https://selfhosted.rsmsn.co/</loc>
<loc>/posts/npm_to_nginx_tutorial.html</loc>
<lastmod>2023-08-05T15:23:51-05:00</lastmod>
</url><url>
<loc>https://selfhosted.rsmsn.co/tags/self-hosted/</loc>
<lastmod>2023-08-05T15:23:51-05:00</lastmod>
</url><url>
<loc>https://selfhosted.rsmsn.co/tags/</loc>
<lastmod>2023-08-05T15:23:51-05:00</lastmod>
</url><url>
<loc>https://selfhosted.rsmsn.co/tags/tutorial/</loc>
<lastmod>2023-08-05T15:23:51-05:00</lastmod>
</url><url>
<loc>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</loc>
<lastmod>2023-08-05T15:23:51-05:00</lastmod>
</url><url>
<loc>https://selfhosted.rsmsn.co/categories/</loc>
<loc>/categories.html</loc>
</url>
</urlset>

171
public/tags.html Normal file
View File

@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="en" dir="auto">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>Tags | Rsmsn Blog</title>
<meta name="keywords" content="">
<meta name="description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks.">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="./tags.html">
<link crossorigin="anonymous" href="./assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="./static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="./static/favicon.ico">
<link rel="apple-touch-icon" href="./apple-touch-icon.png">
<link rel="mask-icon" href="./safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="./tags/index.xml">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
</noscript><meta property="og:title" content="Tags" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:url" content="/tags.html" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Tags"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
</head>
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="./" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<header class="page-header">
<h1>Tags</h1>
</header>
<ul class="terms-tags">
<li>
<a href="./tags/self-hosted.html">self-hosted <sup><strong><sup>2</sup></strong></sup> </a>
</li>
<li>
<a href="./tags/tips-tricks.html">tips &amp; tricks <sup><strong><sup>1</sup></strong></sup> </a>
</li>
<li>
<a href="./tags/troubleshooting.html">troubleshooting <sup><strong><sup>1</sup></strong></sup> </a>
</li>
<li>
<a href="./tags/tutorial.html">tutorial <sup><strong><sup>1</sup></strong></sup> </a>
</li>
</ul>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="./">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

View File

@ -1,30 +1,46 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Tags on Rsmsn Blog</title>
<link>https://selfhosted.rsmsn.co/tags/</link>
<link>/tags.html</link>
<description>Recent content in Tags on Rsmsn Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 05 Aug 2023 15:23:51 -0500</lastBuildDate><atom:link href="https://selfhosted.rsmsn.co/tags/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Wed, 20 Sep 2023 11:33:22 -0400</lastBuildDate><atom:link href="/tags/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>self-hosted</title>
<link>https://selfhosted.rsmsn.co/tags/self-hosted/</link>
<pubDate>Sat, 05 Aug 2023 15:23:51 -0500</pubDate>
<link>/tags/self-hosted.html</link>
<pubDate>Wed, 20 Sep 2023 11:33:22 -0400</pubDate>
<guid>https://selfhosted.rsmsn.co/tags/self-hosted/</guid>
<guid>/tags/self-hosted.html</guid>
<description></description>
</item>
<item>
<title>tips &amp; tricks</title>
<link>/tags/tips-tricks.html</link>
<pubDate>Wed, 20 Sep 2023 11:33:22 -0400</pubDate>
<guid>/tags/tips-tricks.html</guid>
<description></description>
</item>
<item>
<title>troubleshooting</title>
<link>/tags/troubleshooting.html</link>
<pubDate>Wed, 20 Sep 2023 11:33:22 -0400</pubDate>
<guid>/tags/troubleshooting.html</guid>
<description></description>
<content></content>
</item>
<item>
<title>tutorial</title>
<link>https://selfhosted.rsmsn.co/tags/tutorial/</link>
<link>/tags/tutorial.html</link>
<pubDate>Sat, 05 Aug 2023 15:23:51 -0500</pubDate>
<guid>https://selfhosted.rsmsn.co/tags/tutorial/</guid>
<guid>/tags/tutorial.html</guid>
<description></description>
<content></content>
</item>
</channel>

View File

@ -0,0 +1,183 @@
<!DOCTYPE html>
<html lang="en" dir="auto">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>self-hosted | Rsmsn Blog</title>
<meta name="keywords" content="">
<meta name="description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks.">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="../tags/self-hosted.html">
<link crossorigin="anonymous" href="../assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="../static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../static/favicon.ico">
<link rel="apple-touch-icon" href="../apple-touch-icon.png">
<link rel="mask-icon" href="../safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="../tags/self-hosted/index.xml">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
</noscript><meta property="og:title" content="self-hosted" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:url" content="/tags/self-hosted.html" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="self-hosted"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
</head>
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="../" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<header class="page-header">
<h1>
self-hosted
</h1>
</header>
<article class="post-entry tag-entry">
<header class="entry-header">
<h2>Trouble Hosting Hugo with Nginx
</h2>
</header>
<div class="entry-content">
<p>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and Im happy to share some reverse proxy nginx config files....</p>
</div>
<footer class="entry-footer"><span title='2023-09-20 11:33:22 -0400 EDT'>September 20, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Trouble Hosting Hugo with Nginx" href="../posts/hosting_hugo_troubles.html"></a>
</article>
<article class="post-entry tag-entry">
<header class="entry-header">
<h2>Tutorial: Move from NginxProxyManager to Nginx
</h2>
</header>
<div class="entry-content">
<p>A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition....</p>
</div>
<footer class="entry-footer"><span title='2023-08-05 15:23:51 -0500 -0500'>August 5, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Tutorial: Move from NginxProxyManager to Nginx" href="../posts/npm_to_nginx_tutorial.html"></a>
</article>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="../">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

View File

@ -1,280 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>self-hosted on Rsmsn Blog</title>
<link>https://selfhosted.rsmsn.co/tags/self-hosted/</link>
<link>/tags/self-hosted.html</link>
<description>Recent content in self-hosted on Rsmsn Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 05 Aug 2023 15:23:51 -0500</lastBuildDate><atom:link href="https://selfhosted.rsmsn.co/tags/self-hosted/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Wed, 20 Sep 2023 11:33:22 -0400</lastBuildDate><atom:link href="/tags/self-hosted/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Trouble Hosting Hugo with Nginx</title>
<link>/posts/hosting_hugo_troubles.html</link>
<pubDate>Wed, 20 Sep 2023 11:33:22 -0400</pubDate>
<guid>/posts/hosting_hugo_troubles.html</guid>
<description>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and I&amp;rsquo;m happy to share some reverse proxy nginx config files.</description>
</item>
<item>
<title>Tutorial: Move from NginxProxyManager to Nginx</title>
<link>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</link>
<link>/posts/npm_to_nginx_tutorial.html</link>
<pubDate>Sat, 05 Aug 2023 15:23:51 -0500</pubDate>
<guid>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</guid>
<guid>/posts/npm_to_nginx_tutorial.html</guid>
<description>A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition.</description>
<content>&lt;p&gt;A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for &lt;a href=&#34;https://www.reddit.com/r/selfhosted/comments/15j4v80/minitutorial_migrating_from_nginx_proxy_manager/&#34;&gt;this reddit
post&lt;/a&gt; and to post this &lt;a href=&#34;https://github.com/Normanras/Npm_to_Nginx&#34;&gt;my Github profile&lt;/a&gt;. Thought my website would also be a good place to share it for any passers-by.&lt;/p&gt;
&lt;h2 id=&#34;goal&#34;&gt;Goal&lt;/h2&gt;
&lt;p&gt;To give clear instructions to help users migrate from using &lt;a href=&#34;https://nginxproxymanager.com/&#34;&gt;Nginx Proxy Manager&lt;/a&gt; (NPM) to standard &lt;a href=&#34;https://docs.nginx.com/&#34;&gt;Nginx&lt;/a&gt;. This tutorial is not exhaustive and there are many other implementations of this transition. I would recommend checking out the many Nginx &lt;a href=&#34;http://nginx.org/en/docs/&#34;&gt;Documentation Sites&lt;/a&gt; and tutorials to learn more.&lt;/p&gt;
&lt;h3 id=&#34;introduction&#34;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;If you&amp;rsquo;re anything like me and you got into the self-hosted/homelab/diy game sometime within the last 5 years, you&amp;rsquo;ve likely been recommended to use Nginx Proxy Manager as one of the choice Reverse Proxy services. If you&amp;rsquo;ve also been paying attention to various self-hosted communities, you may have also come across Christian Lempa&amp;rsquo;s Video on &lt;a href=&#34;https://youtu.be/uaixCKTaqY0&#34;&gt;trusting smaller self hosted projects and tools&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Spoilers:&lt;/em&gt; He roasts NPM in his video and towards the end says he won&amp;rsquo;t be using NPM anymore. He also, perhaps purposely, doesn&amp;rsquo;t share which tool he will be migrating to.&lt;/p&gt;
&lt;p&gt;Whether you follow Christian away from NPM or not, it dawned on me that while NPM is using a very trusted web server and reverse proxy under the hood, I hadn&amp;rsquo;t taken the time to understand how an Nginx Config actually worked. Since NPM was already creating most of the files for Nginx, I got to reading through all the files and reworking them so that I could begin using Nginx without the NPM gui.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Contributing: This is not all encompassing of Nginx possibilities. Including instructions for various installation methods, using OpenResty, and any other migrations or use cases would help the community. If you&amp;rsquo;d like to add in additional information on how to migrate from NPM to Nginx, that is welcome. Simply submit a PR with your steps.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;tldr---quick-steps&#34;&gt;TL;DR - Quick Steps&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following contents (including sub-directories) from the NPM &lt;code&gt;/data/nginx&lt;/code&gt; directory to the Nginx &lt;code&gt;/etc/nginx&lt;/code&gt; folder:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;proxy_hosts&lt;/code&gt; &amp;gt; &lt;code&gt;sites-available&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;conf.d&lt;/code&gt; &amp;gt; &lt;code&gt;conf.d&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;snippets&lt;/code&gt; &amp;gt; &lt;code&gt;snippets&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;custom_ssl&lt;/code&gt; &amp;gt; &lt;code&gt;custom_ssl&lt;/code&gt; (if applicable)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit each file in your &lt;code&gt;sites-available&lt;/code&gt; directory and update the paths. Most will change from &lt;code&gt;/data/nginx/&lt;/code&gt; to &lt;code&gt;/etc/nginx&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit your &lt;code&gt;nginx.conf&lt;/code&gt; file and ensure the following two paths are there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include /etc/nginx/conf.d/*.conf;&lt;/code&gt; and &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Symlink the proxy host files in &lt;code&gt;sites-available&lt;/code&gt; to &lt;code&gt;sites-enabled&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ln -s * ./sites-enabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test your changes with &lt;code&gt;nginx -t&lt;/code&gt;. Make appropriate changes if there are error messages.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;pre-requisites--assumptions&#34;&gt;Pre-requisites &amp;amp; Assumptions&lt;/h3&gt;
&lt;p&gt;I am using an Ubuntu VM with NPM and it&amp;rsquo;s db as a Docker Container while Nginx is installed natively on the machine. You don&amp;rsquo;t have to use this setup exactly, but I am making a few assumptions as to what you should have access to before you begin. I am also using custom SSL certs, but theoretically, the transition should be the same when using Lets Encrypt.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve added some example files to show before and after changes to this repo and outlined file trees below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You understand the basics of what a Reverse Proxy is doing and are sticking with some stock settings (like exposing port 80 an 443).&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;ve installed &lt;a href=&#34;https://nginxproxymanager.com/setup/&#34;&gt;NPM&lt;/a&gt; and &lt;a href=&#34;https://www.nginx.com/resources/wiki/start/topics/tutorials/install/&#34;&gt;Nginx&lt;/a&gt; using your preferred method.&lt;/li&gt;
&lt;li&gt;You have access to both NPMs file tree and Nginx&amp;rsquo;s.&lt;/li&gt;
&lt;li&gt;If using NPM in docker, make sure you&amp;rsquo;ve mapped a local volume on the host to the container.&lt;/li&gt;
&lt;li&gt;My setup using docker-compose is the following: &lt;code&gt;/user/nginx/data:/data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Know where your Nginx files are. If using docker, same as above, make sure your container directories are mapped to the host.&lt;/li&gt;
&lt;li&gt;For a linux install, they should be accessible at &lt;code&gt;/etc/nginx&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You know how to edit files at the command line using &lt;code&gt;nano&lt;/code&gt;, &lt;code&gt;vi&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;, &lt;code&gt;neovim&lt;/code&gt;, &lt;code&gt;emacs&lt;/code&gt;, or something else.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;nginx-files&#34;&gt;Nginx Files&lt;/h3&gt;
&lt;p&gt;Nginx uses the &lt;code&gt;nginx.conf&lt;/code&gt; file and within that file, it will include your proxy files. These exist under &lt;code&gt;./nginx/sites-enabled/&lt;/code&gt;. In the main &lt;code&gt;nginx.conf&lt;/code&gt; file, the line &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt; will bring in those files to the config file, making the proxies accessible.&lt;/p&gt;
&lt;h3 id=&#34;how-to-transition---detailed-version&#34;&gt;How to Transition - Detailed Version&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Since NPM uses Nginx under the hood, they are both, by default, going to try and use ports 80 and 443 to serve up your apps and content. Turn off both systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Docker: &lt;code&gt;docker stop [app_container, db_container]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Systemd: &lt;code&gt;systemctl stop nginx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy your &lt;code&gt;proxy_host&lt;/code&gt; (NPM) files to the &lt;code&gt;sites-available&lt;/code&gt; (Nginx) folder.
&lt;code&gt;cp -r /user/nginx/data/nginx/proxy_hosts/* /etc/nginx/sites-available/&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Nginx doesn&amp;rsquo;t really care what the files are called, but NPM numbers them based on the order in which you added them in the GUI. I find it better to rename them to what service they actually serve up for easier identification later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy your &lt;code&gt;custom_ssl&lt;/code&gt; folder from NPM to the &lt;code&gt;custom_ssl&lt;/code&gt; folder in Nginx. See the following step for the various default paths in both systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/custom_ssl/* /etc/nginx/custom_ssl/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the &lt;code&gt;conf.d&lt;/code&gt; folder from NPM to the &lt;code&gt;conf.d&lt;/code&gt; folder in Nginx. &lt;em&gt;Note: For some reason, not all of the files in
the proxy files were actually in my &lt;code&gt;conf.d&lt;/code&gt; directory. If you&amp;rsquo;re missing any files, please download and/or copy and
paste them from the &lt;a href=&#34;https://github.com/NginxProxyManager/nginx-proxy-manager/tree/fa851b61da3fe3726d1a04c25e69d36e79edea2d/docker/rootfs/etc/nginx/conf.d/include&#34;&gt;NPM Repo&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/nginx/conf.d /etc/nginx/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you had any additional files included in the Advanced section of an NPM Proxy Host, make sure you copy them over. For my setup and this tutorial, they were all located in the &lt;code&gt;snippets&lt;/code&gt; directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/nginx/snippets/* /etc/nginx/snippets/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are a number of lines that need to be updated in each proxy configuration file to make them work with Nginx. I&amp;rsquo;ve placed additional comments in &lt;a href=&#34;./proxy_host/npm_proxy.conf&#34;&gt;&lt;code&gt;./proxy_host/npm_proxy.conf&lt;/code&gt;&lt;/a&gt; file. The line changes are the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Custom SSL path:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPM path: &lt;code&gt;/data/custom_ssl...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Nginx path: &lt;code&gt;/etc/nginx/custom_ssl...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;conf.d:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The paths should remain the same. However, if you changed the path for &lt;code&gt;conf.d&lt;/code&gt; in Nginx and differed in step 5, above, make sure you use the correct path.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access &amp;amp; Error Logs&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPM path: &lt;code&gt;/data/logs/...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Nginx path: &lt;code&gt;/var/log/nginx/...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Double Check all your paths! If this is your first time using Nginx, make sure every directory is correct! Save your work.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the &lt;code&gt;nginx.conf&lt;/code&gt; file which is located at &lt;code&gt;/etc/nginx/&lt;/code&gt;. You can see the one I am using in this repo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make sure that you have the following two lines in the main conf file and that they are pointing to the appropriate directories in the nginx directory path.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include /etc/nginx/conf.d/*.conf;&lt;/code&gt; and &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You&amp;rsquo;ll notice that you ensured there was a &lt;code&gt;sites-enabled&lt;/code&gt; directory in the configuration file, but you changed all your proxy host config files in &lt;code&gt;sites-available&lt;/code&gt;! Good eye, all that&amp;rsquo;s left is to symlink the files to &lt;code&gt;sites-enabled&lt;/code&gt; so that nginx can start using them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To symlink the available proxy files run the following command within the &lt;code&gt;sites-available&lt;/code&gt; directory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ln -s * ./sites-enabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you&amp;rsquo;re confident that you&amp;rsquo;ve done all the above correctly, you can test your setup using nginx command and flags. While in the directory with your &lt;code&gt;nginx.conf&lt;/code&gt; file - usually &lt;code&gt;/etc/nginx&lt;/code&gt; - run the following command: &lt;code&gt;nginx -t&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If all is working as expected you should see the below output. If it returns any errors, fix them appropriately. It will usually tell you what line is throwing the error. In this case, there&amp;rsquo;s a high likelihood that it will be path error.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx: configuration file /etc/nginx/nginx.conf test is successful
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it! You can now restart your nginx service on the host and access all your sites just as if you were using Nginx Proxy Manager! Make sure you take a look at your logs and system&amp;rsquo;s status should nginx fail to start.&lt;/p&gt;
&lt;h3 id=&#34;additional-informationappendix&#34;&gt;Additional Information/Appendix&lt;/h3&gt;
&lt;h4 id=&#34;file-trees-for-npm-in-container-and-nginx-on-host&#34;&gt;File Trees for NPM (in container) and Nginx (on host)&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;I did not expand every directory in these trees. Only the ones that are pertinent for reference in this tutorial.&lt;/em&gt;&lt;/p&gt;
&lt;h4 id=&#34;nginx&#34;&gt;NGINX&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── conf.d
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── include
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── assets.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── block-exploits.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── force-ssl.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── ip_ranges.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── resolvers.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── custom_ssl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── npm-1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── npm-2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── npm-3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── fastcgi.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── fastcgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── koi-utf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── koi-win
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── mime.types
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── modules-available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── modules-enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── nginx.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── proxy_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── scgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── sites-available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── auth.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── bitwarden.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── codehub.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default.backup
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── files.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── notes.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── photos.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── rsmsn-root.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── wordle.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── wordle-it.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── sites-enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── auth.conf -&amp;gt; /etc/nginx/sites-available/auth.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── bitwarden.conf -&amp;gt; /etc/nginx/sites-available/bitwarden.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── codehub.conf -&amp;gt; /etc/nginx/sites-available/codehub.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── files.conf -&amp;gt; /etc/nginx/sites-available/files.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── notes.conf -&amp;gt; /etc/nginx/sites-available/notes.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── photos.conf -&amp;gt; /etc/nginx/sites-available/photos.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── wordle.conf -&amp;gt; /etc/nginx/sites-available/wordle.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── wordle-it.conf -&amp;gt; /etc/nginx/sites-available/wordle-it.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── snippets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── fastcgi-php.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── snakeoil.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── uwsgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── win-utf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;npm&#34;&gt;NPM&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── access
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── custom_ssl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── npm-1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── npm-2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── npm-3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── keys.json
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── letsencrypt-acme-challenge
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── logs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── mysql
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── nginx
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── custom
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dead_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default_www
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dummycert.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dummykey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 10.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 11.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 12.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 13.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 15.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 1.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 2.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 4.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 5.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── 6.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── redirection_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── snippets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── stream
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── temp
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── docker-compose.yml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── letsencrypt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── renewal-hooks
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
</item>
</channel>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>/tags/self-hosted.html</title>
<link rel="canonical" href="../../../tags/self-hosted.html">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=../../../tags/self-hosted.html">
</head>
</html>

View File

@ -0,0 +1,170 @@
<!DOCTYPE html>
<html lang="en" dir="auto">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>tips &amp; tricks | Rsmsn Blog</title>
<meta name="keywords" content="">
<meta name="description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks.">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="../tags/tips-tricks.html">
<link crossorigin="anonymous" href="../assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="../static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../static/favicon.ico">
<link rel="apple-touch-icon" href="../apple-touch-icon.png">
<link rel="mask-icon" href="../safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="../tags/tips-tricks/index.xml">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
</noscript><meta property="og:title" content="tips &amp; tricks" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:url" content="/tags/tips-tricks.html" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="tips &amp; tricks"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
</head>
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="../" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<header class="page-header">
<h1>
tips &amp; tricks
</h1>
</header>
<article class="post-entry tag-entry">
<header class="entry-header">
<h2>Trouble Hosting Hugo with Nginx
</h2>
</header>
<div class="entry-content">
<p>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and Im happy to share some reverse proxy nginx config files....</p>
</div>
<footer class="entry-footer"><span title='2023-09-20 11:33:22 -0400 EDT'>September 20, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Trouble Hosting Hugo with Nginx" href="../posts/hosting_hugo_troubles.html"></a>
</article>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="../">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<?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>tips &amp; tricks on Rsmsn Blog</title>
<link>/tags/tips-tricks.html</link>
<description>Recent content in tips &amp; tricks on Rsmsn Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 20 Sep 2023 11:33:22 -0400</lastBuildDate><atom:link href="/tags/tips-tricks/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Trouble Hosting Hugo with Nginx</title>
<link>/posts/hosting_hugo_troubles.html</link>
<pubDate>Wed, 20 Sep 2023 11:33:22 -0400</pubDate>
<guid>/posts/hosting_hugo_troubles.html</guid>
<description>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and I&amp;rsquo;m happy to share some reverse proxy nginx config files.</description>
</item>
</channel>
</rss>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>/tags/tips-tricks.html</title>
<link rel="canonical" href="../../../tags/tips-tricks.html">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=../../../tags/tips-tricks.html">
</head>
</html>

View File

@ -0,0 +1,170 @@
<!DOCTYPE html>
<html lang="en" dir="auto">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>troubleshooting | Rsmsn Blog</title>
<meta name="keywords" content="">
<meta name="description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks.">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="../tags/troubleshooting.html">
<link crossorigin="anonymous" href="../assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="../static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../static/favicon.ico">
<link rel="apple-touch-icon" href="../apple-touch-icon.png">
<link rel="mask-icon" href="../safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="../tags/troubleshooting/index.xml">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
</noscript><meta property="og:title" content="troubleshooting" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:url" content="/tags/troubleshooting.html" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="troubleshooting"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
</head>
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="../" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<header class="page-header">
<h1>
troubleshooting
</h1>
</header>
<article class="post-entry tag-entry">
<header class="entry-header">
<h2>Trouble Hosting Hugo with Nginx
</h2>
</header>
<div class="entry-content">
<p>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and Im happy to share some reverse proxy nginx config files....</p>
</div>
<footer class="entry-footer"><span title='2023-09-20 11:33:22 -0400 EDT'>September 20, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Trouble Hosting Hugo with Nginx" href="../posts/hosting_hugo_troubles.html"></a>
</article>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="../">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<?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>troubleshooting on Rsmsn Blog</title>
<link>/tags/troubleshooting.html</link>
<description>Recent content in troubleshooting on Rsmsn Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 20 Sep 2023 11:33:22 -0400</lastBuildDate><atom:link href="/tags/troubleshooting/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Trouble Hosting Hugo with Nginx</title>
<link>/posts/hosting_hugo_troubles.html</link>
<pubDate>Wed, 20 Sep 2023 11:33:22 -0400</pubDate>
<guid>/posts/hosting_hugo_troubles.html</guid>
<description>For the last 3 days, I have been spending a few hours after working trying to figure out why my brand new Hugo site was not loading correctly on my sub-domain. For context, I use Nginx to host all my apps and servers, most of them using reverse proxy protocols such as $proxy_host, $forward_scheme, and $port. There are a few more and I&amp;rsquo;m happy to share some reverse proxy nginx config files.</description>
</item>
</channel>
</rss>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>/tags/troubleshooting.html</title>
<link rel="canonical" href="../../../tags/troubleshooting.html">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=../../../tags/troubleshooting.html">
</head>
</html>

171
public/tags/tutorial.html Normal file
View File

@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="en" dir="auto">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="index, follow">
<title>tutorial | Rsmsn Blog</title>
<meta name="keywords" content="">
<meta name="description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks.">
<meta name="author" content="Norm Rasmussen">
<link rel="canonical" href="../tags/tutorial.html">
<link crossorigin="anonymous" href="../assets/css/stylesheet.5cfc680b1eeaeef9efbced92d46c2a9e876b72ee14fba85846afc4cff9e6e6f8.css" integrity="sha256-XPxoCx7q7vnvvO2S1Gwqnodrcu4U&#43;6hYRq/Ez/nm5vg=" rel="preload stylesheet" as="style">
<link rel="icon" href="../static/favicon.ico">
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../static/favicon.ico">
<link rel="apple-touch-icon" href="../apple-touch-icon.png">
<link rel="mask-icon" href="../safari-pinned-tab.svg">
<meta name="theme-color" content="#2e2e33">
<meta name="msapplication-TileColor" content="#2e2e33">
<link rel="alternate" type="application/rss+xml" href="../tags/tutorial/index.xml">
<noscript>
<style>
#theme-toggle,
.top-link {
display: none;
}
</style>
</noscript><meta property="og:title" content="tutorial" />
<meta property="og:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks." />
<meta property="og:type" content="website" />
<meta property="og:url" content="/tags/tutorial.html" /><meta property="og:site_name" content="RsmsnBlog" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="tutorial"/>
<meta name="twitter:description" content="A site to share self hosted tutorials, troubleshooting, and tips/tricks."/>
</head>
<body class="list dark" id="top">
<script>
if (localStorage.getItem("pref-theme") === "light") {
document.body.classList.remove('dark')
}
</script>
<header class="header">
<nav class="nav">
<div class="logo">
<a href="../" accesskey="h" title="Rsmsn Blog (Alt + H)">Rsmsn Blog</a>
<div class="logo-switches">
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</div>
</div>
<ul id="menu">
</ul>
</nav>
</header>
<main class="main">
<header class="page-header">
<h1>
tutorial
</h1>
</header>
<article class="post-entry tag-entry">
<header class="entry-header">
<h2>Tutorial: Move from NginxProxyManager to Nginx
</h2>
</header>
<div class="entry-content">
<p>A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition....</p>
</div>
<footer class="entry-footer"><span title='2023-08-05 15:23:51 -0500 -0500'>August 5, 2023</span>&nbsp;·&nbsp;Norm Rasmussen</footer>
<a class="entry-link" aria-label="post link to Tutorial: Move from NginxProxyManager to Nginx" href="../posts/npm_to_nginx_tutorial.html"></a>
</article>
</main>
<footer class="footer">
<span>&copy; 2023 <a href="../">Rsmsn Blog</a></span>
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
<a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a>
</span>
</footer>
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
<path d="M12 6H0l6-6z" />
</svg>
</a>
<script>
let menu = document.getElementById('menu')
if (menu) {
menu.scrollLeft = localStorage.getItem("menu-scroll-position");
menu.onscroll = function () {
localStorage.setItem("menu-scroll-position", menu.scrollLeft);
}
}
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener("click", function (e) {
e.preventDefault();
var id = this.getAttribute("href").substr(1);
if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({
behavior: "smooth"
});
} else {
document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView();
}
if (id === "top") {
history.replaceState(null, null, " ");
} else {
history.pushState(null, null, `#${id}`);
}
});
});
</script>
<script>
var mybutton = document.getElementById("top-link");
window.onscroll = function () {
if (document.body.scrollTop > 800 || document.documentElement.scrollTop > 800) {
mybutton.style.visibility = "visible";
mybutton.style.opacity = "1";
} else {
mybutton.style.visibility = "hidden";
mybutton.style.opacity = "0";
}
};
</script>
<script>
document.getElementById("theme-toggle").addEventListener("click", () => {
if (document.body.className.includes("dark")) {
document.body.classList.remove('dark');
localStorage.setItem("pref-theme", 'light');
} else {
document.body.classList.add('dark');
localStorage.setItem("pref-theme", 'dark');
}
})
</script>
</body>
</html>

View File

@ -1,280 +1,20 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>tutorial on Rsmsn Blog</title>
<link>https://selfhosted.rsmsn.co/tags/tutorial/</link>
<link>/tags/tutorial.html</link>
<description>Recent content in tutorial on Rsmsn Blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Sat, 05 Aug 2023 15:23:51 -0500</lastBuildDate><atom:link href="https://selfhosted.rsmsn.co/tags/tutorial/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Sat, 05 Aug 2023 15:23:51 -0500</lastBuildDate><atom:link href="/tags/tutorial/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Tutorial: Move from NginxProxyManager to Nginx</title>
<link>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</link>
<link>/posts/npm_to_nginx_tutorial.html</link>
<pubDate>Sat, 05 Aug 2023 15:23:51 -0500</pubDate>
<guid>https://selfhosted.rsmsn.co/posts/npm_to_nginx_tutorial/</guid>
<guid>/posts/npm_to_nginx_tutorial.html</guid>
<description>A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for this reddit post and to post this my Github profile. Thought my website would also be a good place to share it for any passers-by.
Goal To give clear instructions to help users migrate from using Nginx Proxy Manager (NPM) to standard Nginx. This tutorial is not exhaustive and there are many other implementations of this transition.</description>
<content>&lt;p&gt;A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for &lt;a href=&#34;https://www.reddit.com/r/selfhosted/comments/15j4v80/minitutorial_migrating_from_nginx_proxy_manager/&#34;&gt;this reddit
post&lt;/a&gt; and to post this &lt;a href=&#34;https://github.com/Normanras/Npm_to_Nginx&#34;&gt;my Github profile&lt;/a&gt;. Thought my website would also be a good place to share it for any passers-by.&lt;/p&gt;
&lt;h2 id=&#34;goal&#34;&gt;Goal&lt;/h2&gt;
&lt;p&gt;To give clear instructions to help users migrate from using &lt;a href=&#34;https://nginxproxymanager.com/&#34;&gt;Nginx Proxy Manager&lt;/a&gt; (NPM) to standard &lt;a href=&#34;https://docs.nginx.com/&#34;&gt;Nginx&lt;/a&gt;. This tutorial is not exhaustive and there are many other implementations of this transition. I would recommend checking out the many Nginx &lt;a href=&#34;http://nginx.org/en/docs/&#34;&gt;Documentation Sites&lt;/a&gt; and tutorials to learn more.&lt;/p&gt;
&lt;h3 id=&#34;introduction&#34;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;If you&amp;rsquo;re anything like me and you got into the self-hosted/homelab/diy game sometime within the last 5 years, you&amp;rsquo;ve likely been recommended to use Nginx Proxy Manager as one of the choice Reverse Proxy services. If you&amp;rsquo;ve also been paying attention to various self-hosted communities, you may have also come across Christian Lempa&amp;rsquo;s Video on &lt;a href=&#34;https://youtu.be/uaixCKTaqY0&#34;&gt;trusting smaller self hosted projects and tools&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Spoilers:&lt;/em&gt; He roasts NPM in his video and towards the end says he won&amp;rsquo;t be using NPM anymore. He also, perhaps purposely, doesn&amp;rsquo;t share which tool he will be migrating to.&lt;/p&gt;
&lt;p&gt;Whether you follow Christian away from NPM or not, it dawned on me that while NPM is using a very trusted web server and reverse proxy under the hood, I hadn&amp;rsquo;t taken the time to understand how an Nginx Config actually worked. Since NPM was already creating most of the files for Nginx, I got to reading through all the files and reworking them so that I could begin using Nginx without the NPM gui.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Contributing: This is not all encompassing of Nginx possibilities. Including instructions for various installation methods, using OpenResty, and any other migrations or use cases would help the community. If you&amp;rsquo;d like to add in additional information on how to migrate from NPM to Nginx, that is welcome. Simply submit a PR with your steps.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;tldr---quick-steps&#34;&gt;TL;DR - Quick Steps&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the following contents (including sub-directories) from the NPM &lt;code&gt;/data/nginx&lt;/code&gt; directory to the Nginx &lt;code&gt;/etc/nginx&lt;/code&gt; folder:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;proxy_hosts&lt;/code&gt; &amp;gt; &lt;code&gt;sites-available&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;conf.d&lt;/code&gt; &amp;gt; &lt;code&gt;conf.d&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;snippets&lt;/code&gt; &amp;gt; &lt;code&gt;snippets&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;custom_ssl&lt;/code&gt; &amp;gt; &lt;code&gt;custom_ssl&lt;/code&gt; (if applicable)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit each file in your &lt;code&gt;sites-available&lt;/code&gt; directory and update the paths. Most will change from &lt;code&gt;/data/nginx/&lt;/code&gt; to &lt;code&gt;/etc/nginx&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit your &lt;code&gt;nginx.conf&lt;/code&gt; file and ensure the following two paths are there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include /etc/nginx/conf.d/*.conf;&lt;/code&gt; and &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Symlink the proxy host files in &lt;code&gt;sites-available&lt;/code&gt; to &lt;code&gt;sites-enabled&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ln -s * ./sites-enabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Test your changes with &lt;code&gt;nginx -t&lt;/code&gt;. Make appropriate changes if there are error messages.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;pre-requisites--assumptions&#34;&gt;Pre-requisites &amp;amp; Assumptions&lt;/h3&gt;
&lt;p&gt;I am using an Ubuntu VM with NPM and it&amp;rsquo;s db as a Docker Container while Nginx is installed natively on the machine. You don&amp;rsquo;t have to use this setup exactly, but I am making a few assumptions as to what you should have access to before you begin. I am also using custom SSL certs, but theoretically, the transition should be the same when using Lets Encrypt.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve added some example files to show before and after changes to this repo and outlined file trees below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You understand the basics of what a Reverse Proxy is doing and are sticking with some stock settings (like exposing port 80 an 443).&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;ve installed &lt;a href=&#34;https://nginxproxymanager.com/setup/&#34;&gt;NPM&lt;/a&gt; and &lt;a href=&#34;https://www.nginx.com/resources/wiki/start/topics/tutorials/install/&#34;&gt;Nginx&lt;/a&gt; using your preferred method.&lt;/li&gt;
&lt;li&gt;You have access to both NPMs file tree and Nginx&amp;rsquo;s.&lt;/li&gt;
&lt;li&gt;If using NPM in docker, make sure you&amp;rsquo;ve mapped a local volume on the host to the container.&lt;/li&gt;
&lt;li&gt;My setup using docker-compose is the following: &lt;code&gt;/user/nginx/data:/data&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Know where your Nginx files are. If using docker, same as above, make sure your container directories are mapped to the host.&lt;/li&gt;
&lt;li&gt;For a linux install, they should be accessible at &lt;code&gt;/etc/nginx&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You know how to edit files at the command line using &lt;code&gt;nano&lt;/code&gt;, &lt;code&gt;vi&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;, &lt;code&gt;neovim&lt;/code&gt;, &lt;code&gt;emacs&lt;/code&gt;, or something else.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;nginx-files&#34;&gt;Nginx Files&lt;/h3&gt;
&lt;p&gt;Nginx uses the &lt;code&gt;nginx.conf&lt;/code&gt; file and within that file, it will include your proxy files. These exist under &lt;code&gt;./nginx/sites-enabled/&lt;/code&gt;. In the main &lt;code&gt;nginx.conf&lt;/code&gt; file, the line &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt; will bring in those files to the config file, making the proxies accessible.&lt;/p&gt;
&lt;h3 id=&#34;how-to-transition---detailed-version&#34;&gt;How to Transition - Detailed Version&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Since NPM uses Nginx under the hood, they are both, by default, going to try and use ports 80 and 443 to serve up your apps and content. Turn off both systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Docker: &lt;code&gt;docker stop [app_container, db_container]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Systemd: &lt;code&gt;systemctl stop nginx&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy your &lt;code&gt;proxy_host&lt;/code&gt; (NPM) files to the &lt;code&gt;sites-available&lt;/code&gt; (Nginx) folder.
&lt;code&gt;cp -r /user/nginx/data/nginx/proxy_hosts/* /etc/nginx/sites-available/&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Nginx doesn&amp;rsquo;t really care what the files are called, but NPM numbers them based on the order in which you added them in the GUI. I find it better to rename them to what service they actually serve up for easier identification later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy your &lt;code&gt;custom_ssl&lt;/code&gt; folder from NPM to the &lt;code&gt;custom_ssl&lt;/code&gt; folder in Nginx. See the following step for the various default paths in both systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/custom_ssl/* /etc/nginx/custom_ssl/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the &lt;code&gt;conf.d&lt;/code&gt; folder from NPM to the &lt;code&gt;conf.d&lt;/code&gt; folder in Nginx. &lt;em&gt;Note: For some reason, not all of the files in
the proxy files were actually in my &lt;code&gt;conf.d&lt;/code&gt; directory. If you&amp;rsquo;re missing any files, please download and/or copy and
paste them from the &lt;a href=&#34;https://github.com/NginxProxyManager/nginx-proxy-manager/tree/fa851b61da3fe3726d1a04c25e69d36e79edea2d/docker/rootfs/etc/nginx/conf.d/include&#34;&gt;NPM Repo&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/nginx/conf.d /etc/nginx/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you had any additional files included in the Advanced section of an NPM Proxy Host, make sure you copy them over. For my setup and this tutorial, they were all located in the &lt;code&gt;snippets&lt;/code&gt; directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cp -r /user/nginx/data/nginx/snippets/* /etc/nginx/snippets/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There are a number of lines that need to be updated in each proxy configuration file to make them work with Nginx. I&amp;rsquo;ve placed additional comments in &lt;a href=&#34;./proxy_host/npm_proxy.conf&#34;&gt;&lt;code&gt;./proxy_host/npm_proxy.conf&lt;/code&gt;&lt;/a&gt; file. The line changes are the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Custom SSL path:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPM path: &lt;code&gt;/data/custom_ssl...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Nginx path: &lt;code&gt;/etc/nginx/custom_ssl...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;conf.d:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The paths should remain the same. However, if you changed the path for &lt;code&gt;conf.d&lt;/code&gt; in Nginx and differed in step 5, above, make sure you use the correct path.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access &amp;amp; Error Logs&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NPM path: &lt;code&gt;/data/logs/...&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Nginx path: &lt;code&gt;/var/log/nginx/...&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Double Check all your paths! If this is your first time using Nginx, make sure every directory is correct! Save your work.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the &lt;code&gt;nginx.conf&lt;/code&gt; file which is located at &lt;code&gt;/etc/nginx/&lt;/code&gt;. You can see the one I am using in this repo.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make sure that you have the following two lines in the main conf file and that they are pointing to the appropriate directories in the nginx directory path.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;include /etc/nginx/conf.d/*.conf;&lt;/code&gt; and &lt;code&gt;include /etc/nginx/sites-enabled/*;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You&amp;rsquo;ll notice that you ensured there was a &lt;code&gt;sites-enabled&lt;/code&gt; directory in the configuration file, but you changed all your proxy host config files in &lt;code&gt;sites-available&lt;/code&gt;! Good eye, all that&amp;rsquo;s left is to symlink the files to &lt;code&gt;sites-enabled&lt;/code&gt; so that nginx can start using them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To symlink the available proxy files run the following command within the &lt;code&gt;sites-available&lt;/code&gt; directory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ln -s * ./sites-enabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once you&amp;rsquo;re confident that you&amp;rsquo;ve done all the above correctly, you can test your setup using nginx command and flags. While in the directory with your &lt;code&gt;nginx.conf&lt;/code&gt; file - usually &lt;code&gt;/etc/nginx&lt;/code&gt; - run the following command: &lt;code&gt;nginx -t&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If all is working as expected you should see the below output. If it returns any errors, fix them appropriately. It will usually tell you what line is throwing the error. In this case, there&amp;rsquo;s a high likelihood that it will be path error.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nginx: configuration file /etc/nginx/nginx.conf test is successful
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it! You can now restart your nginx service on the host and access all your sites just as if you were using Nginx Proxy Manager! Make sure you take a look at your logs and system&amp;rsquo;s status should nginx fail to start.&lt;/p&gt;
&lt;h3 id=&#34;additional-informationappendix&#34;&gt;Additional Information/Appendix&lt;/h3&gt;
&lt;h4 id=&#34;file-trees-for-npm-in-container-and-nginx-on-host&#34;&gt;File Trees for NPM (in container) and Nginx (on host)&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;I did not expand every directory in these trees. Only the ones that are pertinent for reference in this tutorial.&lt;/em&gt;&lt;/p&gt;
&lt;h4 id=&#34;nginx&#34;&gt;NGINX&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── conf.d
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── include
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── assets.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── block-exploits.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── force-ssl.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── ip_ranges.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── resolvers.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── custom_ssl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── npm-1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── npm-2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── npm-3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── fastcgi.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── fastcgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── koi-utf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── koi-win
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── mime.types
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── modules-available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── modules-enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── nginx.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── proxy_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── scgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── sites-available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── auth.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── bitwarden.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── codehub.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default.backup
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── files.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── notes.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── photos.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── rsmsn-root.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── wordle.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── wordle-it.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── sites-enabled
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── auth.conf -&amp;gt; /etc/nginx/sites-available/auth.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── bitwarden.conf -&amp;gt; /etc/nginx/sites-available/bitwarden.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── codehub.conf -&amp;gt; /etc/nginx/sites-available/codehub.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── files.conf -&amp;gt; /etc/nginx/sites-available/files.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── notes.conf -&amp;gt; /etc/nginx/sites-available/notes.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── photos.conf -&amp;gt; /etc/nginx/sites-available/photos.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── wordle.conf -&amp;gt; /etc/nginx/sites-available/wordle.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── wordle-it.conf -&amp;gt; /etc/nginx/sites-available/wordle-it.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── snippets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-authrequest-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── authelia-location-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── fastcgi-php.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── snakeoil.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── uwsgi_params
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── win-utf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;npm&#34;&gt;NPM&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── data
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── access
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── custom_ssl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── npm-1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── npm-2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── npm-3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── fullchain.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── privkey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── keys.json
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── letsencrypt-acme-challenge
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── logs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── mysql
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── nginx
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── custom
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dead_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── default_www
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dummycert.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── dummykey.pem
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── proxy_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 10.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 11.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 12.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 13.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 15.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 1.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 2.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 4.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── 5.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── 6.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── redirection_host
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── snippets
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-authrequest-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location-basic.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   ├── authelia-location-detect.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   │   └── proxy.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   ├── stream
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;│   └── temp
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;├── docker-compose.yml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── letsencrypt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── renewal-hooks
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content>
</item>
</channel>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>/tags/tutorial.html</title>
<link rel="canonical" href="../../../tags/tutorial.html">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=../../../tags/tutorial.html">
</head>
</html>

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
static/rsmsncircles.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

1
themes/PaperMod Submodule

Submodule themes/PaperMod added at efe4cb4516

Submodule themes/dark-theme-editor deleted from 8aa1d497b0

Submodule themes/terminal deleted from 7e13d24d10