Remix run repeatedly logs: No route matches /admin/config.php

I have developed a Shopify app in Remix template and hosted it on a VPS.

After creating a build, I can serve using Nginx to a particular location by passing the port where the Remix app is running.
Everything works fine but the app keeps logging the same error on loop and never stops. The error is:

POST /admin/config.php 404 - - 6.879 ms
Error: No route matches URL "/admin/config.php"
    at getInternalRouterError (/home/username/apps/myapp/remix-app/node_modules/@remix-run/router/router.ts:4377:5)
    at Object.query (/home/username/apps/myapp/remix-app/node_modules/@remix-run/router/router.ts:2856:19)
    at handleDocumentRequestRR (/home/username/apps/myapp/remix-app/node_modules/@remix-run/server-runtime/dist/server.js:168:35)
    at requestHandler (/home/username/apps/myapp/remix-app/node_modules/@remix-run/server-runtime/dist/server.js:93:24)
    at /home/username/apps/myapp/remix-app/node_modules/@remix-run/express/dist/server.js:42:28
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
ErrorResponseImpl {
  status: 404,
  statusText: 'Not Found',
  internal: true,
  data: 'Error: No route matches URL "/admin/config.php"',
  error: Error: No route matches URL "/admin/config.php"
      at getInternalRouterError (/home/username/apps/myapp/remix-app/node_modules/@remix-run/router/router.ts:4377:5)
      at Object.query (/home/username/apps/myapp/remix-app/node_modules/@remix-run/router/router.ts:2856:19)
      at handleDocumentRequestRR (/home/username/apps/myapp/remix-app/node_modules/@remix-run/server-runtime/dist/server.js:168:35)
      at requestHandler (/home/username/apps/myapp/remix-app/node_modules/@remix-run/server-runtime/dist/server.js:93:24)
      at /home/username/apps/myapp/remix-app/node_modules/@remix-run/express/dist/server.js:42:28
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
}

What’s the reason for this and how can I stop this from happening?
Any help would be appreciated.

Regards,
Ahmed Khan

hey,

overall, this isn’t a specific Shopify issue. it happens to all apps.

the random requests to /admin/config.php are caused by bots attempting to hack your app. /admin/config.php is an attack vector for wordpress sites. since ~30% of the internet runs on wordpress, bots designed to compromise wordpress are extremely common. think of them as mosquitos - usually harmless unless they’re carrying a disease you’re vulnerable to. but annoying either way.

if you’ve got a url on the public internet, this will happen. you can add a wildcard route in your remix app that sends a 500 response so that this doesn’t trigger an unhandled exception. there are also some things you can do with cloudflare to keep those requests going through but that’s only if you are getting so many of these that it’s affecting your server billing