# 188-all-sites.conf.j2
# AWOOOI Nginx 全站設定 — 由 Ansible nginx-sync.yml playbook 管理
# 禁止直接手改此檔案 → 請修改 roles/nginx/templates/188-all-sites.conf.j2
# 部署指令: ansible-playbook -i inventory/hosts.yml playbooks/nginx-sync.yml --tags 188
# 最後同步: {{ ansible_date_time.iso8601 }}

# ============================================================
# OpenClaw (port 8088)
# ============================================================
server {
    listen 80;
    server_name openclaw.awoooi.com;

    location / {
        proxy_pass http://127.0.0.1:8088;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_read_timeout 300s;
    }
}

# ============================================================
# tsenyang (port 3000)
# ============================================================
server {
    listen 80;
    server_name tsenyang.awoooi.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

# ============================================================
# momo (port 5003)
# ============================================================
server {
    listen 80;
    server_name momo.awoooi.com;

    location / {
        proxy_pass http://127.0.0.1:5003;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

# ============================================================
# SignOz (port 3301)
# ============================================================
server {
    listen 80;
    server_name signoz.awoooi.internal;

    location / {
        proxy_pass http://127.0.0.1:3301;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

# ============================================================
# MinIO (port 9000 API / 9001 Console)
# ============================================================
server {
    listen 80;
    server_name minio.awoooi.internal;

    location / {
        proxy_pass http://127.0.0.1:9001;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        client_max_body_size 500m;
    }
}

# ============================================================
# LiteLLM (port 4000)
# ============================================================
server {
    listen 80;
    server_name litellm.awoooi.internal;

    location / {
        proxy_pass http://127.0.0.1:4000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_read_timeout 300s;
    }
}

# ============================================================
# n8n (port 5678)
# ============================================================
server {
    listen 80;
    server_name n8n.awoooi.internal;

    location / {
        proxy_pass http://127.0.0.1:5678;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

# ============================================================
# Open WebUI (port 3010)
# ============================================================
server {
    listen 80;
    server_name open-webui.awoooi.internal;

    location / {
        proxy_pass http://127.0.0.1:3010;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 300s;
    }
}

# ============================================================
# Docker Registry (port 5001)
# ============================================================
server {
    listen 80;
    server_name registry.awoooi.internal;

    location / {
        proxy_pass http://127.0.0.1:5001;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        client_max_body_size 2g;
    }
}
