3. Cài nginx proxy manager
// Cài đặt nano để sửa file
apt install nano
// Tạo thư mục chứa docker file của nginx proxy manager (mình tạo ở /home/nginx)
mkdir /home/nginx
cd /home/nginx
nano docker-compose.yaml// Sao chép đoạn này vào file
version: '3.8'
services:
app:
container_name: nginx-proxy
image: 'jc21/nginx-proxy-manager:latest'
restart: always
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
network_mode: bridge
// ctrl + o
// enter
// để lưu file
// ctrl + x để thoátSau khi chạy xong, vào portainer sẽ thấy nginx proxy manager đã được deploy

Chúng ta vào http://localhost:81/ để vào dashboard kiểm tra (thay localhost thành ip của vsp) Tài khoản mặc định là - username: [email protected] - password: changeme

Nginx proxy manager cũng hỗ trợ SSL Let's Encrypt hoặc bạn có thể tự thêm thêm ssl của mình vào đây

Last updated
Was this helpful?