I have only one subdomain name available, e.g. https://sport.abc.com,
I would like to serve desktop version from a folder called /wwwroot/sport.abc.com/dist/sport/desktop/ , however when detecting it's a mobile client, serve from a different folder /wwwroot/sport.abc.com/dist/sport/mobile/ How to modify my current Nginx config file to serve mobile browser?
my current Nginx config is the following
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;
}
}