Welcome to Sysadmins of the North

A technical blog where topics include: computer, servers, web, sysadmin, databases, virtualization, optimization and security.

Set PHP handler accessPolicy (Request Restrictions) to Read in IIS

Disallow direct access to PHP files in wp-content/uploads/

It’s recommended to disallow access to and execution of PHP files in wp-content/uploads folder. Preferably without the use of a security plugin. Blocking access to PHP files in WordPress wp-content/uploads folder is easily achieved with a .htaccess file on Linux Apache, or web.config accesssPolicy in Windows Server IIS, and here is how.

Bash function to generate a random alphanumeric string

Create a random string in Bash easily. You can use this Bash function in your .bashrc file to generate a random alphanumeric string. This comes in handy when you need to generate a long, secure password for example. Adjust to your needs.

WMI Query GPMC WMI Filter

WMI Filters for Group Policy to manage Windows Server versions

Using the Windows Management Infrastructure, or WMI, Windows admins can create filters to apply GPOs more granular on specific versions of Windows Server. In this post I provide some basic examples. Example WMI filters for you to use in Group Policy Objects (GPOs) to target and manage specific Windows Server versions like 2012R2, 2016, 2019 and Windows Server 2022.

HTTP Basic authentication

Basic Authentication module for Windows Server IIS 10

Basic Authentication managed HTTP module for IIS 10 with virtual users support. In my pursuit of a basic authentication alternative in IIS, other than the built-in Basic Authentication module or Helicon Ape, I came across Devbridge AzurePowerTools. It’s apparently one of few HTTP managed modules for IIS that enables HTTP Basic Authentication with support for virtual users.

Removing phantom application folders from website configuration in IIS

how to remove phantom application folders from websites in IIS using PowerShell? Today I wanted to remove application folders from the website configuration in IIS whose physical path on the filesystem was removed. E.g when the application folder “/test1” in the website example.com should point to z:\sites\example.com\www\test1 but was removed. Here is now.

Microsoft Internet Information Services logo

IIS backup and restore

How to easily create the backup of IIS websites, application pools and configuration and restore them, using appcmd or PowerShell.

Reduce Wordfence CPU usage, disable Wordfence “Live Traffic View”

Whenever WordPress is using a lot of CPU and you have Wordfence Security plugin enabled, it is recommended to double check some settings. Unfortunately the Wordfence “Live Traffic Options” (“Traffic logging mode”) feature can cause high CPU usage and load issues for WordPress websites. Therefore, I recommend you disable this feature to improve the performance of your WordPress website.

Use -SearchBase with Get-ADComputer for faster results

Using -SeachBase with PowerShell’s Get-ADComputer cmdlet gives faster results when querying Active Directory Domain Services (AD DS) with PowerShell. You can use this for your own advantage, here is a little example to speed up AD DS queries.

WSL Monit website monitoring status

Setting up Monit monitoring in Windows Subsystem for Linux WSL

How to install and configure Monit monitoring in Windows 10 WSL. Set up a Monit monitoring service for your websites and services. A couple of years ago, I wrote a blog article about setting up Monit monitoring on an Ubuntu VM on Hyper-V. Now it’s time to do the same, but then in Windows Subsystem for Linux, or WSL. For this, I use Ubuntu.