server { listen 1689; listen [::]:1689 ipv6only=on; set $kms_dir '/kms-server'; location /assets { root $kms_dir; } location / { include kms_params; include fastcgi_params; fastcgi_pass unix:/run/php-fpm.sock; if ($http_user_agent ~* (curl|wget)) { set $cli_mode "true"; } fastcgi_param KMS_CLI $cli_mode; fastcgi_param SCRIPT_FILENAME $kms_dir/src/Route.php; } }