[Vuejs]-Nginx: try_files's last value does not work when root is variable

0đź‘Ť

The reason is I have this config :

location / {
    if ($http_user_agent ~* "(Android|iPhone|iPod|Symbian|BlackBerry|Windows Phone|Mobile|J2ME)") {
        access_log   /var/log/nginx/xxmobile.log;
    }
    ........
}

The “access_log” option can not be in “if” scope, but this config can be reloaded without error message. So it works after removing this option.

Leave a comment