webhosting

Load test with CPload

When building large complex infrastructures it becomes harder to validate if the performance you need can be provided by the system you've build. But customer demand for ever faster websites is growing by the day, how do you make sure you'll be able to handle the next big sale or event on your web platform? I use a load generator that can replay access logs and has a way to slowly ramp up traffic to replicate a gradual or sudden inrush of traffic.

Multiple flavours of nginx http to https redirects

Redirects in nginx are really powerful, here are some cool and common examples. all domains http > https and remove www Redirect all http traffic which has no other better matching server_name defined from www.domain.tld and domain.tld to https://domain.tld # redirect http://www to https non www # global and maybe not the best in all setups server { listen 80; server_name ~^(www\.)(?<domain>.+)$; return 301 https://$domain$request_uri; } http > https Redirect all of the incoming http requests to https for selected domains

Nginx map subdomain to subfolder

In this tutorial I'll show you how to direct your incoming web traffic dynamically to folders on your server. This is really useful for a lot of setups I use this one a lot for development environments because you can give developers rights to create new folders and it automatically has its own sub domain. Example: DNS endpoint Folder on disk example.com /var/www/example.com/htdocs/ test.