Error loading config.yml file after deploying site

Hi all,

I have the CMS working great locally, but after deploying I get an error when navigating to /admin/


I have checked the server and the config.yml is definitely there in the admin folder.

The site is deployed on IIS and developed using Gatsby.

Thanks!

Can you share your repo?

Just to be sure:

  • visit /admin/ and not /admin
  • use config.yml and not config.yaml
  • visit yoursite.netlify.app/admin.config.yml to see if your config is actually deployed

I am definitely using /admin/ and config.yml
/admin.config.yml returns a 404

The repo is at GitHub - SSWConsulting/SSW.Rules: Generator for ssw.com.au/rules

Thanks :slight_smile:

Hi @bradystroud, can you share a link to where the CMS is deployed (the URL you use to access the CMS)?
This error usually means it’s not deployed correctly.

Also the CMS config should under /admin/config.yml (not admin.config.yml which I assume is a typo).

Hi @erez,

Hi bradystroud, can you share a link to where the CMS is deployed (the URL you use to access the CMS)?

Unfortunately no, the site is only accessible on our intranet.

Also the CMS config should under /admin/config.yml (not admin.config.yml which I assume is a typo).

We tried querying that URL as per @tomrutgers suggestion. /admin/config.yml also returns a 404.

If we do a http call on the CSS file in the same location (admin/cms.css), It returns a 200 OK and we can see the contents of the file.

We have looked in the server and the config.yml file exists at that path, any idea why we can’t access it?

Thanks,

-Brady

Hi @bradystroud, do you have a build process that generates the deployed site from the src code? If so you’ll need to make sure that the config.yml file is included in the generated built artifacts.

I suggest sharing a sample repo with your setup so we can better diagnose the issue.

1 Like

Hi @erez @tomrutgers,

We managed to fix the problem by adding a MIME mapping for .yml files in our web.config file.
The problem we were having was similar to this.

Thanks,

-Brady

2 Likes

Thanks for sharing the solution @bradystroud!

1 Like