VMware Tanzu Archive

 View Only

 Download [https://buildpacks.cloudfoundry.org/dependencies/nginx/nginx-1.17.8-linux-x64-cflinuxfs3-bc522996.tgz

Ajith kumar's profile image
Ajith kumar posted Feb 25, 2020 03:50 PM

when I am pushing angular app using nginx buildpack It giving following error

Download [https://buildpacks.cloudfoundry.org/dependencies/nginx/nginx-1.17.8-linux-x64-cflinuxfs3-bc522996.tgz]

  2020/02/25 20:15:10 [emerg] 287#0: open() "/tmp/conf728429693/mime.types" failed (2: No such file or directory) in /tmp/conf728429693/nginx.conf:12

  nginx: configuration file /tmp/conf728429693/nginx.conf test failed

     **ERROR** Could not validate nginx.conf: nginx.conf contains syntax errors: exit status 1

  Failed to compile droplet: Failed to run all supply scripts: exit status 14

  Exit status 223

Error staging application: App staging failed in the buildpack compile phase



please help what needs to be done.

Daniel Mikusa's profile image
Daniel Mikusa

You are pushing an invalid nginx.conf. The buildpack is testing your configuration when it runs and the test is failing.








It looks like your config is referencing a file mime.types which does not exist. If you need that file, make sure you push it with your app.


More details on creating a suitable nginx.conf for the buildpack: https://docs.cloudfoundry.org/buildpacks/nginx/index.html#templating


Hope that helps!


Rohan Sharma's profile image
Rohan Sharma

In my opinion, The error suggests a missing "mime.types" file in the nginx configuration. Here's what you can do:


  • Check your nginx.conf file, especially around line 12 where it mentions "mime.types." Ensure the path is correct and the file exists.
  • Confirm that all paths in your nginx configuration are accurate.
  • Try downloading the nginx buildpack again or use a different version. The provided link is for version 1.17.8; newer versions might be available.
  • Refer to the official nginx buildpack documentation for correct configuration steps.
  • If the issue persists, seek help on Cloud Foundry community forums or support.



I hope this will help you.



Rohan Sharma