我想配置用 ai.test.com訪問, 不要用ai.test.com/app/ai
server {
server_name ai.test.com;
listen 80;
access_log off;
proxy_buffering off;
root /var/www/html/webmanai/public;
location ^~ / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://127.0.0.1:8787/app/ai;
}
}
http://m.wtbis.cn/app/view/ai
常見問題里有寫,不用動nginx配置,webman寫個路由就行了
在 config/route.php中增加如下路由配置
Route::any('/', [plugin\ai\app\controller\IndexController::class, 'index']);
執(zhí)行 php start.php reload