Pramvir_Rathee is seeking help to serve custom static XML sitemaps directly from Discourse’s /uploads/default/original/ directory, as the built-in sitemap plugin crashes due to large topic queries. Discourse doesn’t serve XML files by default, and adding XML to upload settings doesn’t resolve the issue. pfaffman suggests modifying the nginx configuration inside the container to serve XML files from a dedicated directory (e.g., /sitemap) by editing /etc/nginx/conf.d/discourse.conf, then reloading nginx with sv restart nginx. He advises later persisting these changes via app.yml for future rebuilds. Pramvir_Rathee asks for clarification, and pfaffman offers to assist directly if the issue is urgent and budget allows, directing to his profile for contact info.
My discourse site is very big and I had created custom sitemaps for my site. The traditional discourse sitemap plugin is crashing because the topics query is too big and is timing out for my Database. It is exceeding all kinds of big resources. Thus i made my own static xml sitemaps. Now i need to upload somewhere to serve.
But discourse only serves images directly uploaded in this folder, not xml. What should I do? Adding xml extension in file upload settings is not helping either.
i want to serve my files as /uploads/default/original/2X/1.xml /uploads/default/original/2X/2.xml like this
Enter the container and edit /etc/nginx/conf.d/discourse.conf to have it serve files from /sitemap. You can Google nginx for help on how you might do that.
You can get nginx to reload the config with
sv restart nginx
That will solve your immediate problem. The you can go about making changes to app.yml that will make those changes when you rebuild the container.
If that doesn’t make sense and it’s urgent and you have a budget my contact info is in my profile.