Skip to content

kt-alt/nginx-proxy-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Nginx Proxy Manager

This project provides the artifacts needed to stand up a container with nginx and the proxy manager app installed. It's based on the steps outlined here:

https://nginxproxymanager.com/guide/#quick-setup

https://www.youtube.com/watch?v=P3imFC7GSr0

  • nginx proxy manager install & config

To configure nginx as a reverse proxy for wordpress, pi-hole, and any other applications, there are 2 broad steps (+ optional ssl):

  1. Create local DNS entries, for example mywordpress.home.arpa, and map these to the ip address of nginx so that any requests will be routed first the nginx proxy. This can be done in the pi-hole admin UI. Otherwise pi-hole's configuration file for custom local dns entries is located in the container's /etc/pi-hole/custom.list.

  2. Create proxy host entries which map the incoming source hostname to the underlying app's server/container's ip:port. Nginx will pass the request through to the underlying app and the pass back the response to the client. Note if you want to use the short name (ie mywordpress), you may need to define mywordpress as an alternate source domain for each of the desired proxy hosts (in addition to the long name mywordpress.home.arpa).

  3. Since there is a reverse proxy, this is where you should centrally configure & manage https/ssl for all of the underlying apps. To do this upload the server cert & private key for each of the desired hostnames. Then enable SSL for each of the desired proxy hosts.

Extra Step for Wordpress

You may need to configure the Wordpress & Site Address (in wordpress's General Setttings) to use the long name mywordpress.home.arpa. If you use the short name mywordpress, you might get the REST API / loopback request errors in wordpress's Site Health area and this will prevent things like the scheduled maintenance tasks (like backups) from firing.

However, if you've set up your machine and domain names correctly, this shouldn't be necessary - ie both short and long names will resolve properly.

Custom Location

If you want users to be forwarded a specific path, you need to define a Custom Location in the Proxy Host. For example, if you want users to be able to just point to http://mypilehole_dnsname (no /admin), create Custom Location in the Proxy Host as follows:

  • location: /
  • scheme: http
  • forward hostname/ip: pihole_ip
  • forward port: pihole_port
  • "gear button": rewrite ^/$ /admin break;

In the above location represents the originating path "/", pihole is the destination machine, and "gear button" is where you would put the code that would normally go into the nginx.conf's location {...}.

Manual Configuration of Nginx as a Reverse Proxy

Better to use the nginx-proxy-manager as it's all UI driven and faster, but if you want/need to manually configure nginx as a reverse proxy you can follow some of the tutorials below:

https://www.youtube.com/watch?v=T7flzYEtMGA

  • set up https for worpress with nginx

https://www.youtube.com/watch?v=wQcSql62zRo

  • how to add ssl to web apps using nginx reverse proxy

https://www.youtube.com/watch?v=QcnAqN_Ihqk

  • how to set up (nginx) reverse proxy on home network

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published