The Perfect Web Server – Nginx, Ajenti, Ubuntu



I’ve done a lot of installing of web servers over the last while, some of which have been effortless, others a thorn in my side. I’ve decided to compile a guide for my latest server setup that I’ve fallen in love with;

First a breakdown of what we’ll be installing today;

Nginx: (pronounced Engine X) is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Nginx doesn’t rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but more importantly,predictable amounts of memory under load.
Even if you don’t expect to handle thousands of simultaneous requests, you can still benefit from Nginx’s high-performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers.

Ajenti: “The admin panel your servers deserve.” Easily extensible using Python. Plugin development is fast and pleasant with rich APIs. Includes lots of plugins for system and software configuration, monitoring and management.

Ajenti V: A plugin for Ajenti that makes website setup easy – including app servers, database, and routing.

Ubuntu: If you don’t know what Ubuntu is we’re in trouble.

Now I’m going to take a leap of faith and assume you can either install Ubuntu yourself or figure out how to get a server with it already. A DigitalOcean droplet works perfectly here. So lets log in as root and run all this:

You should now be able to log in to your Ajenti control panel at with:

username: root
password: admin


Now that’s done you’ll notice if you open /etc/nginx/nginx.conf that files inside /etc/nginx/conf.d/ are loaded before any other .conf files, this is where you should put any additional configuration for Nginx. However if you are just configuring a specific domain or website you should just put the configuration in the Ajenti  website configuration’s advanced section.

That’s all folks! 🙂


  1. Great post worked perfectly, thanks!

  2. Craig Schupp

    I was just considering getting a Digital Ocean virtual server to potentially replace a shared-host account I have. My sites are quickly outgrowing the resources given to me.

    This guide sold me on the setup above. You’d be surprised how little information is out there on the subject of it all. I’d recommend keeping this guide up to date with any tweaks or tricks you find along the way.

  3. Thanks guys, I will indeed be keeping it up to date, I’ve already got a few more tweaks to share once I get a chance to make another post. Stay tuned!

  4. Mark Gibson

    Thanks for the article. I have setup a new Debian 8 server to test this. I have installed everything as per your instructions succesfully however I’m unable to open https://IP:8000.

    I can confirm the port is listening fine.
    tcp 0 0* LISTEN 944/python

    There are no iptables set.

    I can open http://IP and hit the nginx page. FTP is also working fine as per SSH access.
    It only appears to be an issue with ajenti on https://IP:8000.

    I’m also unable to telnet to IP on port 8000, it bombs out straight away.

    What steps do you recommend to troubleshoot?

Leave a comment

Please be polite. We appreciate that. Your email address will not be published and required fields are marked

This site uses Akismet to reduce spam. Learn how your comment data is processed.