Example of nginx configuration for October with Nuxtjs or Nextjs

Hi! I want to try October as headless CMS and would like to deploy it as a subfolder while the front-end part will be at the root / of the domain. For example http://example.com/october or http://example.com/admin shows the admin login page, http://example.com/october/api exposes API and http://example.com delegates to Nextjs or Nuxtjs. Is it possible? Can you please share an nginx config for such setup?