Change to a profile style page, added post about multiple git repos. Need to write script to auto-update blog posts.

This commit is contained in:
Norm Rasmussen
2023-09-22 17:44:49 -04:00
parent a6586baf38
commit 2d1410bf45
32 changed files with 1758 additions and 242 deletions

View File

@ -1,18 +1,42 @@
+++
title = 'Tutorial: Move from NginxProxyManager to Nginx'
date = 2023-08-05T15:23:51-05:00
draft = false
tags = ["tutorial", "self-hosted", ]
+++
---
title: 'Tutorial: Move from NginxProxyManager to Nginx'
date: 2023-08-05T15:23:51-05:00
draft: false
tags: ["git", "backups", "commandline"]
author: "Me"
showToc: true
TocOpen: false
draft: false
hidemeta: false
description: "Learn one way to push your git changes to multiple remote repositories."
disableHLJS: false # to disable highlightjs
disableShare: false
disableHLJS: false
hideSummary: false
searchHidden: true
ShowReadingTime: true
ShowBreadCrumbs: true
ShowPostNavLinks: true
ShowWordCount: true
ShowRssButtonInSectionTermList: true
UseHugoToc: true
cover:
image: "<image path/url>" # image path/url
alt: "<alt text>" # alt text
caption: "<text>" # display caption under cover
relative: false # when using page bundles set this to true
hidden: true # only hide on current single page
---
## Goal
A Tutorial Repo for migrating your Nginx Proxy Manager proxy setup to Nginx. I wrote this originally for [this reddit
post](https://www.reddit.com/r/selfhosted/comments/15j4v80/minitutorial_migrating_from_nginx_proxy_manager/) and to post this [my Github profile](https://github.com/Normanras/Npm_to_Nginx). 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](https://nginxproxymanager.com/) (NPM) to standard [Nginx](https://docs.nginx.com/). This tutorial is not exhaustive and there are many other implementations of this transition. I would recommend checking out the many Nginx [Documentation Sites](http://nginx.org/en/docs/) and tutorials to learn more.
### Introduction
## Introduction
If you're anything like me and you got into the self-hosted/homelab/diy game sometime within the last 5 years, you've likely been recommended to use Nginx Proxy Manager as one of the choice Reverse Proxy services. If you've also been paying attention to various self-hosted communities, you may have also come across Christian Lempa's Video on [trusting smaller self hosted projects and tools](https://youtu.be/uaixCKTaqY0).
@ -22,7 +46,7 @@ Whether you follow Christian away from NPM or not, it dawned on me that while NP
*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'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.*
### TL;DR - Quick Steps
## TL;DR - Quick Steps
1. Copy the following contents (including sub-directories) from the NPM `/data/nginx` directory to the Nginx `/etc/nginx` folder:
@ -42,7 +66,7 @@ Whether you follow Christian away from NPM or not, it dawned on me that while NP
5. Test your changes with `nginx -t`. Make appropriate changes if there are error messages.
### Pre-requisites & Assumptions
## Pre-requisites & Assumptions
I am using an Ubuntu VM with NPM and it's db as a Docker Container while Nginx is installed natively on the machine. You don'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.
@ -57,11 +81,11 @@ I've added some example files to show before and after changes to this repo and
* For a linux install, they should be accessible at `/etc/nginx`.
* You know how to edit files at the command line using `nano`, `vi`, `vim`, `neovim`, `emacs`, or something else.
### Nginx Files
## Nginx Files
Nginx uses the `nginx.conf` file and within that file, it will include your proxy files. These exist under `./nginx/sites-enabled/`. In the main `nginx.conf` file, the line `include /etc/nginx/sites-enabled/*;` will bring in those files to the config file, making the proxies accessible.
### How to Transition - Detailed Version
## How to Transition - Detailed Version
1. 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.
@ -120,13 +144,13 @@ nginx: configuration file /etc/nginx/nginx.conf test is successful
And that'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's status should nginx fail to start.
### Additional Information/Appendix
## Additional Information/Appendix
#### File Trees for NPM (in container) and Nginx (on host)
### File Trees for NPM (in container) and Nginx (on host)
*I did not expand every directory in these trees. Only the ones that are pertinent for reference in this tutorial.*
#### NGINX
### NGINX
```bash
├── conf.d
@ -191,7 +215,7 @@ And that's it! You can now restart your nginx service on the host and access all
└── win-utf
```
#### NPM
### NPM
```bash
├── data