nginx conf for dokku was overwritten

September 12, 2014 4k views

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?

3 comments
  • 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
    
  • So I was able to solve the problem I had by running a simple command before reinstall the plugin.

    $ export DOKKU_ROOT=/home/dokku
    
1 Answer

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.

Have another answer? Share your knowledge.