Question

nginx conf for dokku was overwritten

  • Posted September 12, 2014

In the process of installing dokku plugins (dokku plugins-install), I accidentally overwrite the nginx.conf file. As a result, all of my apps are returning a 502 Bad Gateway error.

Is there a way for me to fix this/ restore the original config?

Subscribe
Share

So I was able to solve the problem I had by running a simple command before reinstall the plugin.

$ export DOKKU_ROOT=/home/dokku

Remove /etc/nginx/conf.d/dokku.conf and run /var/lib/dokku/plugins/nginx-vhosts/install

If you’re talking about application specific nginx.conf - just re-deploy it (by setting a config var for an instance)

Thanks Puck, I just did that and got this error. Any thought?

/var/lib/dokku/plugins/nginx-vhosts/install: line 36: /HOSTNAME: No such file or directory
cp: cannot stat ‘/HOSTNAME’: No such file or directory

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @tridnguyen:

So I was able to solve the problem I had by running a simple command before reinstall the plugin.

$ export DOKKU_ROOT=/home/dokku

You can see the comment here.