ODK aggregate not working

I created a droplet and installed ODK aggregate. After a long struggle, I managed to install letsencrypt certificate and at that point the site stopped redirecting to ODK aggregate and instead brings up the “Welcome to nginx!” message. I am completely lost as to what has gone wrong. I am new to everything nginx and ODK aggregate. Someone please help. Thanks in advance.

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Accepted Answer

Well, let me answer my own question since I managed to resolve the problem, and just in case someone else falls into the same ditch … The problem was caused by two things: 1. When ODK aggregate is installed on digitalocean, it actually creates an nginx config file named ‘aggregate’ which is placed in the /etc/nginx/sites-enabled directory. Since it is placed in the ‘sites-enabled’ directory, it gets included to the nginx.conf file. If one creates a config file elsewhere whose directives or values conflicts with this file, then they are in ditch. For me, I did not only create another config file in the sites-available directory, but I eventually named it ‘aggregate’ and linked it to the sites-enabled directory, thus overwriting the original aggregate config file which has one crucial directive which makes sure that requests are directed to the tomcat server. I did not know about that directive and I therefore did not include it in the replacement config file. And, well, good grief!

Letsencrypt also kept complaining of conflicting serve-names and because I was unaware of the existence of the original aggregate config file, I couldn’t figure out why the error kept popping up. I only managed to install the certificates after wiping out the original aggregate config file but then, at that point, ODK aggregate also stopped working.

The second (or is it third) problem that when creating the droplet, I did not use the exact name of the domain. As a matter of fact of fact, the first droplet I created had the default name suggested by digitalocean. ODK aggregate worked well until it was time to get the Letsencrypt certificate. It took time to figure out the cause of the problem.

So, to avoid the pit fall:

  1. Name the droplet with the exact name of your domain (or subdomain)
  2. Do not disturb the aggregate file in the sites-enabled directory unless you can recreate it within the sites-enabled directory or elsewhere.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.