Master Nginx Proxy Manager with Docker: Easy Setup, Static & Dynamic Proxies
Learn how to install and configure the visual Nginx management tool nginx‑proxy‑manager using Docker, set up static and dynamic proxy hosts, enable automatic SSL, and integrate it with a SpringBoot‑Vue e‑commerce project, complete with step‑by‑step commands and screenshots.
Introduction
nginx-proxy-manageris a visual Nginx management tool with over 25k stars on GitHub. It lets you create proxy hosts, obtain free SSL certificates automatically, and manage users without deep Nginx knowledge.
Features
Beautiful and secure user‑management interface.
Create proxy, redirect, and streaming rules without knowing Nginx.
Automatic free SSL certificate issuance and renewal.
Access Lists and Basic authentication for secure host access.
User, permission management and audit logging.
Installation
Using Docker to install nginx-proxy-manager is very convenient.
Pull the Docker image: docker pull jc21/nginx-proxy-manager:latest Run the container:
docker run -p 80:80 -p 81:81 -p 443:443 --name nginx-proxy-manager \
-v /mydata/nginx-pm/data:/data \
-v /mydata/nginx-pm/letsencrypt:/etc/letsencrypt \
-d jc21/nginx-proxy-manager:latestAfter the container starts, open the management page at http://<your‑ip>:81 with the default credentials [email protected]:changeme.
Static Proxy Example
Using the mall e‑commerce project as an example, modify your local /etc/hosts file: 192.168.3.101 mall.macrozheng.com Add a proxy host in the UI (Hosts → Proxy Hosts → Add Proxy Host) and configure the domain and target server in the Details tab.
In the Advanced tab, add a custom Nginx location block for static files:
location /admin {<br/> alias /data/html/admin;<br/> index index.html index.htm;<br/>}Upload the built admin frontend to /mydata/nginx-pm/data/html and access it at http://mall.macrozheng.com/admin/.
For the frontend shop, add another location block:
location /app {<br/> alias /data/html/app;<br/> index index.html index.htm;<br/>}Now the shop is reachable at http://mall.macrozheng.com/app/.
Dynamic Proxy Example
Modify /etc/hosts for the API domain: 192.168.3.101 api.macrozheng.com Add a new proxy host and set the hostname to admin-api.macrozheng.com. The API is then accessible at http://api.macrozheng.com/swagger-ui/.
Other Features
Enable SSL with automatic free certificate issuance.
Use Access Lists for Basic authentication on proxy hosts.
User Management for handling users and permissions.
Audit Log to view operation history.
Chinese Version
A Chinese‑localized image nginx-proxy-manager-zh provides the same functionality with translated UI. Run it with:
docker run -p 80:80 -p 81:81 -p 443:443 --name nginx-proxy-manager \
-v /mydata/nginx-pm/data:/data \
-v /mydata/nginx-pm/letsencrypt:/etc/letsencrypt \
-d chishin/nginx-proxy-manager-zh:releaseConclusion
The visual Nginx Proxy Manager offers a clean interface and powerful features, allowing you to manage Nginx proxies, SSL certificates, and access controls without deep Nginx expertise.
Project Links
GitHub: https://github.com/NginxProxyManager/nginx-proxy-manager
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
macrozheng
Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
