# BuildAdmin Webman - Nginx 反向代理示例
# 将 server_name 和 root 改为实际值后，放入 nginx 的 conf.d 或 sites-available

upstream webman {
    server 127.0.0.1:8787;
    keepalive 10240;
}

server {
    server_name 你的域名;
    listen 80;
    access_log off;
    root /path/to/dafuweng-webman/public;

    location / {
        try_files $uri $uri/ @proxy;
    }

    location @proxy {
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_pass http://webman;
    }

    location ~ \.php$ {
        return 404;
    }

    location ~ ^/\.well-known/ {
        allow all;
    }

    location ~ /\. {
        return 404;
    }
}
