thimiraonline I have installed Flarum in nginx Bitnami instance and I cannot generate /sitemap.xml. How to correct this? It shows 404 error.
1Dot thimiraonline If you are using nginx and accessing /sitemap.xml results in an nginx 404 page, you can add the following rule to your configuration file, underneath your existing locationrule: location = /sitemap.xml { try_files $uri $uri/ /index.php?$query_string; } This rule makes sure that Flarum will answer the request for /sitemap.xml when no file exists with that name. Run the below command to reload nginx. sudo nginx -s reload Access yourdomain/sitemap.xml If you are still unable to access it, then try clearing your cloudflare cache and also flarum cache by running php flarum cache:clear If your problem is ☑ Solved then select this post as a best answer 😁
thimiraonline 1Dot you can add the following rule to your configuration file, Where is this configuration file, and what is the name of it?
1Dot thimiraonline It is by default located in etc/nginx/sites-available/default.conf also add that code above ending curly bracket.
thimiraonline 1Dot My file structure is different from a usual installation, because I'am running with a Bitnami Stack.
1Dot thimiraonline So here is your file /opt/bitnami/nginx/conf/nginx.conf also add that code above ending curly bracket.