nginx-proxy-manager 是一个NGINX反向代理管理系统,相当于在 Web 界面上进行可视化配置Nginx。还可以获得受信任的 SSL 证书,并通过单独的配置、自定义和入侵保护来管理多个代理。界面截图请阅读到底部查看!
这个项目是为了满足个人需求,为用户提供一种简单的方法来完成反向 使用SSL终止代理主机,它必须非常简单,以至于猴子可以做到这一点。这个目标没有改变。 虽然可能有高级选项,但它们是可选的,项目应该尽可能简单 这样这里的进入门槛就低了。
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
docker-compose up -d
# If using docker-compose-plugin
docker compose up -d
当您的 docker 容器运行时,在管理界面的端口上连接到它。 有时,由于密钥的原因,这可能需要一点时间。
http://127.0.0.1:81
默认管理员用户:
Email: admin@example.com
Password: changeme
使用此默认用户登录后,系统会立即要求您修改您的详细信息并更改密码。
创建一个文件:docker-compose.yml
version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format :
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
# Uncomment the next line if you uncomment anything in the section
# environment:
# Uncomment this if you want to change the location of
# the SQLite DB file within the container
# DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
然后:
docker-compose up -d
如果您选择 MySQL 配置,则必须自己提供数据库服务器。您也可以使用 MariaDB。以下是支持的最低版本:
也可以轻松地为您的数据库使用另一个 docker 容器并将其链接为 docker 堆栈的一部分,因此这就是以下示例 将使用。
以下是使用 MariaDB 容器时的外观示例:docker-compose.yml
version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format :
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "npm"
DB_MYSQL_NAME: "npm"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- ./data/mysql:/var/lib/mysql
注意
请注意,环境变量将优先于变量。因此,如果您保留MySQL变量,您将无法使用SQLite。DB_MYSQL_*DB_SQLITE_*
如果你是一个更高级的用户,你可能会渴望额外的Nginx可定制性。
NPM 能够在不同位置包含不同的自定义配置片段。
您可以在以下位置添加自定义配置代码段文件:/data/nginx/custom
每个文件都是可选的。
您可以配置X-FRAME-OPTIONS页眉 值,将其指定为 Docker 环境变量。如果未指定,则缺省值为 。deny
...
environment:
X_FRAME_OPTIONS: "sameorigin"
...
docker-compose pull
docker-compose up -d
此项目将自动更新任何数据库或其他要求,因此您不必遵循 任何疯狂的指示。上面的这些步骤将提取最新更新并重新创建 docker
1、用户登录界面
2、自定义配置
3、添加配置
4、看板
5、定义404主机
6、权限配置
页面更新:2024-03-27
本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828
© CopyRight 2020-2024 All Rights Reserved. Powered By 71396.com 闽ICP备11008920号-4
闽公网安备35020302034903号