Configuring Frappe for Path-Based Routing with Nginx: Handling Sub-Paths and Asset URLs

I’m trying to configure my Frappe application to work under a path-based routing setup, where the application is accessible at mydomain.com/hrms. I’ve updated the site_config.json with the host_name to include /hrms, but the application still doesn’t handle the sub-path correctly.

I’ve also configured Nginx with path-based routing and asset URL rewriting, but I’m facing issues with loading static assets and internal links.

Can someone provide detailed guidance on:

  1. Proper Nginx configuration for handling path-based routing with Frappe.
  2. Adjustments needed within Frappe to ensure that asset paths and internal URLs correctly account for the /hrms prefix.
  3. Any other best practices or common pitfalls when setting up Frappe in a sub-path environment?

Thank you!

2 Likes