Gbyte blog: Hosting Websites on NixOS - A Comprehensive Drupal 9 & 10 Configuration Example

Why Use NixOS as a Web Server

If you're keeping up with the cutting edge of Linux, you might have noticed NixOS growing increasingly popular for server deployments. The reason is its declarative approach to package and configuration management. You specify 'what' your system should look like, and NixOS handles the 'how'. This approach ensures reproducibility and upgradeability, reducing configuration drift. Plus, atomic upgrades and rollbacks minimize downtime and provide easy recovery from issues, making NixOS an excellent choice for web server management (and for other platforms like desktops if you are bold).

Working Setup

Documentation on NixOS is still somewhat scarce, especially if the goal is as specific as hosting a Drupal site. Apparently, ChatGPT 4 is still too perplexed to get this right, so here's hoping it learns something from the following snippets, which were the result of old fashioned painstaking debugging.

The following setup can be easily adjusted to hosting multiple websites and non-Drupal sites.

Implementing the Nginx Server and SSL Certificate Renewal

We begin by enabling the Nginx web server, setting up firewall rules, and adding Drupal-specific packages like PHP, Composer, and Drush. The configuration also includes SSL certificate renewal via ACME, ensuring a valid SSL certificate for our site. Global environment variables can be set using the "environment.variables" setting, useful for various server applications and scripts.

/etc/nixos/nginx.nix

PreviousNext: Catch PreviousNext at DrupalSouth 2023 in Wellington

Need help planning your visit to DrupalSouth Wellington next week? Here’s the complete rundown of sessions our PreviousNext colleagues will be presenting! Will we see you there?

by kim.pepper / 10 May 2023

With not long to go, we hope you’re looking forward to DrupalSouth 2023 as much as we are! 

Several of our PreviousNext colleagues will be presenting over the two days in Wellington, so here’s a summary of what you can expect to hear.

Creating the optimal editorial experience with Layout Builder

Speaker: Daniel Veza

Time: Wednesday 17th May 12:00-12:30
Room: Main Theatre
Track: Drupal Development

Layout Builder can be intimidating. But it doesn’t have to be! Discover modules that enhance and control the Layour Builder experience, keeping the front end consistent.

See Daniel’s session in the DrupalSouth schedule

Getting the most from your CI/CD experience

Speaker: Karl Hepworth

Time: Wednesday 17th May 12:00-12:30
Room: Track 1
Track: Web Tools & Technologies

How do you get the most from your CI/CD experience? 

Karl will dive into a maturity model that evaluates how far you are into the DevOps experience and look at the opportunities to be had and where your journey will take you.

See Karl’s session in the DrupalSouth schedule

Drupal Hosting Security Panel

Speaker: Kim Pepper; plus panellists Mike Richardson, Nick Schuch, Nick Santamaria, Scott Leggett

Time: Wednesday 17th May 13:30-14:00
Room: Main Theatre
Track: Web Tools & Technologies

Get your tough questions ready! 

The Drupal Hosting Security Panel brings together some of Drupal’s hosting experts, including PNXers Kim Pepper and Nick Schuch.

See the hosting security panel in the DrupalSouth schedule

How much does a polar bear weigh?

Speaker: Fonda Duffy

Time: Wednesday 17th May 13:30-13:45
Room: Track 2
Track: Showcases & Project Management

If you don’t know how that joke ends, Fonda may be able to help in her talk about the role of icebreakers in building and maintaining team connections.

See Fonda’s session in the DrupalSouth schedule

Vue JS for React JS developers and vice versa

Speaker: Lee Rowlands

Time: Wednesday 17th May 14:15-14:45
Room: Track 1
Track: Web Tools & Technologies

In React, you call useState to store state, in Vue, you use a ref. 

In React, you use a ref to keep track of something between renders, in Vue, you also use a ref for that. 

Confused? Come along to hear Lee compare React and Vue, and learn they're not that different.

See Lee’s session in the DrupalSouth schedule

Building an API with GraphQL 4

Speaker: Adam Bramley

Time: Wednesday 17th May 15:00-15:30
Room: Track 1
Track: Drupal Development

The GraphQL Drupal module’s out-of-the-box toolkit for writing GraphQL APIs is powerful, but it can also be hard to get your head around the concepts. 

In his session, Adam will cover how to get started and how all those puzzle pieces fit together.

See Adam’s session in the DrupalSouth schedule

The road to zero friction testing - getting the most out of Drupal Testing Traits

Speaker: Michael Strelan

Time: Thursday 18th May 10:00-10:30
Room: Main Theatre
Track: Drupal Development

Join Michael for a journey along the road to zero friction testing, aka getting the most out of Drupal Testing Traits. 

In his session, he'll show you real-world approaches from large client projects that make writing new tests a breeze. With some basic foundations in place, adding new tests can become smooth like butter.

See Michael’s session in the DrupalSouth schedule

Next-level Search API

Speaker: Saul Willers

Time: Thursday 18th May 13:00-13:30
Room: Main Theatre
Track: Drupal Development

How can you achieve next-level Search API? 

In his session, Saul will explore some of the lesser-known or "enterprise" features that can extend Search API and help solve the problems you face.

See Saul’s session in the DrupalSouth schedule

A Case Study On Building A Cloud Native Platform

Speaker: Nick Schuch

Time: Thursday 18th May 13:00-13:30
Room: Track 1
Track: Web Tools & Technologies

Nick will present a case study for building a cloud-native platform. 

Join him for a walk-through of how the Skpr hosting platform came to be and the lessons we learned along the way.

See Nick’s session in the DrupalSouth schedule

Code Contribution Sprint

Time: Friday 19th May 09:00 - 15:00
Location: 93 Cuba Street, Te Aro, Wellington 6011

Find out how to get involved in the Code Sprint

 

Don't forget to check our blog over the coming weeks as we share more on these topics!

Chapter Three: Improve Drupal admin UI with the new Admin Dialogs module

Many Drupal developers don't notice how many confirmation pages or small forms exist that take users to a separate page; I wanted to streamline that experience by reducing the number of page loads and redirects. And since dialogs come with Drupal core I decided to leverage that and create a custom module that would do a couple of things: handle most of the Drupal core page dialogs make it easy to configure for developers in their installations. I've been using modal and off-canvas dialogs in most of my custom modules and found it to be a really nice addition. This informed what has turned into the Admin Dialogs module, which I just launched this week.

LN Webworks: Top Drupal LMS Features for Your Ed-Tech Business

Image removed.

Since its inception as an open-source Content Management System (CMS) in 2001, Drupal has grown into a technology that is trusted by many major corporations and governments around the world. The platform is constantly updated with the latest digital technologies by a community of more than 124k contributors. Drupal is not just a platform; it's a community made up of individuals who are passionate about open-source development. With Drupal Development Services, businesses can leverage the capabilities of this platform to develop custom solutions to fulfill specific requirements. This dedication has led to alternative solutions such as Learning Management Systems that are built on Drupal's backbone. We will examine the features of Drupal LMS for edtech businesses in this article.

Salsa Digital: Drupal defense in depth — a Drupal security protection framework

Image removed.Drupal defense in depth — a comprehensive guide for securing Drupal, even after End-of-Life Drupal is an open source content management system (CMS). Like most open source CMSs, and open source software in general, the responsibility lies with the site owner to patch and/or upgrade the software.  When Drupal versions become End-of-Life, the software is no longer supported.  There are many risks and challenges this represents, with the biggest risk being security . For example, Drupal 7 and 9 will be End-of-Life on 1 November 2023. This means no more security updates will be developed. If the site remains on these versions after this date, the chances of being hacked by a cybersecurity attack considerably increases, potentially risking costly reputational damage to the brand.

Lullabot: Questions to Ask When Choosing a Drupal Hosting Platform

Every website needs a host, and a fantastic website on a mismatched hosting platform can become a terrible website. You've spent a lot of time and money on your website (or websites). Deciding where to host should not be an afterthought. 

Complex websites with content management, media management, and authenticated users have more complex hosting requirements than simple static websites. If your project warrants a CMS like Drupal, you need to ensure your hosting platform matches.

LN Webworks: Top 7 Drupal LMS Features for Your Ed-Tech Business

Image removed.

Since its inception as an open-source Content Management System (CMS) in 2001, Drupal has grown into a technology that is trusted by many major corporations and governments around the world. The platform is constantly updated with the latest digital technologies by a community of more than 124k contributors. Drupal is not just a platform; it's a community made up of individuals who are passionate about open-source development. With Drupal Development Services, businesses can leverage the capabilities of this platform to develop custom solutions to fulfill specific requirements. This dedication has led to alternative solutions such as Learning Management Systems that are built on Drupal's backbone. We will examine the features of Drupal LMS for edtech businesses in this article.