【发布时间】:2020-10-03 02:38:47
【问题描述】:
我只有一个子域名可用,例如https://sport.abc.com,
我想从名为 /wwwroot/sport.abc.com/dist/sport/desktop/ 的文件夹中提供桌面版本,但是当检测到它是移动客户端时,从不同的文件夹 /wwwroot/sport.abc.com/dist/sport/mobile/ 提供服务如何修改我当前的 Nginx 配置文件以服务移动浏览器?
我当前的 Nginx 配置如下
server {
listen 80;
server_name sport.abc.com;
access_log /logs/sport.abc.com.log combined;
index index.html index.htm index.php;
root /wwwroot/sport.abc.com/dist/sport/desktop/;
location / {
try_files $uri $uri/ /index.html;
}
}
【问题讨论】:
标签: nginx web mobile nginx-location nginx-config