title: Mapping Google App Engine service to a custom domain path
body: <p>I'm creating an API in Python using FastAPI and trying to map a custom service to a path on my domain, the case is as follows:</p>
  <p>Default Service: <code>defaultapp.uc.r.appspot.com</code> mapped to <code>api.mydomain.com</code> and working fine.</p>
  <p>Second Service <code>service2-dot-defaultapp.uc.r.appspot.com</code>, I want to map it to <code> api.mydomain.com/service2/</code></p>
  <hr />
  <p>Default service <code>dispatch.yaml</code></p>
  <pre><code>dispatch:
    - url: &quot;*/service2/*&quot;
      service: service2
    - url: &quot;defaultapp.uc.r.appspot.com/service2/*&quot;
      service: service2
    - url: &quot;api.mydomain.com/service2/*&quot;
      service: service2
  </code></pre>
  <hr />
  <p>service2 <code>service2.yaml</code></p>
  <pre><code>runtime: python37
  entrypoint: gunicorn -w 8 -k uvicorn.workers.UvicornWorker service2:app
  service: service2
  </code></pre>
  <hr />
  <p>When trying to access service2 from <code>service2-dot-defaultapp.uc.r.appspot.com</code> it works fine,</p>
  <p>but when I try to access it from <code>defaultapp.uc.r.appspot.com/service2/</code> or <code>api.mydomain.com/service2/</code> it gives me <code>{&quot;detail&quot;:&quot;Not Found&quot;}</code>,</p>
  <p>I believe it tries to access <code>/service2/</code> as a FastAPI path (example: <code>@app.get('/service2/')</code> from the default service, and not from <code>dispatch.yaml</code>,</p>
  <hr />
  <p>EDIT:
  I've changed the <code>default service</code> from an API to a static site so any path given like <code>/service2/</code> won't be taken from the API but from the routes in the <code>dispath.yaml</code> file, but still the same issue when accessing <code>defaultapp.uc.r.appspot.com/service2/</code> or <code>api.mydomain.com/service2/</code> it gives me <code>{&quot;detail&quot;:&quot;Not Found&quot;}</code></p>
  <p>any idea how can I make it work?</p>