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 https://yourserver.com:8000 with:
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! 🙂
Posted on February 18, 2015