Windows Server How To: Force Redirect all sites on a server to HTTPS in IIS

In this guide, I’ll walk you through the process of redirecting every site hosted on your server to HTTPS. Please note each site will need to have the HTTPS bindings properly configured else the sites won’t load at all.

 

Continue reading

Windows Server How To – Use Windows Defender with hMailServer

hMailServer naively supports using ClamAV (provided you have it installed), but ClamAV arguably isn’t the most effective antivirus available. Since Windows Server 2016 comes with Windows Defender built in, you can use Windows Defender as a third-party virus scanner instead of purchasing something else. It’s all very easy to configure too.

Continue reading

Quick and dirty Windows MySQL + IIS Backups

If you’re looking for a quick and dirty way to back up your MySQL databases and your IIS website files, look no further. Below are two batch scripts for backing up your MySQL databases via a MySQL dump and a quick script to copy and compress your IIS website files into a .zip file.

I personally have the scripts save the backups in a OneDrive folder which then uploads them to OneDrive for backup. Others may want to use something like SyncBack to upload them to an FTP server elsewhere etc.

Continue reading

SSL How To | Exporting the Private Key and Certificate from a .pfx file

If you’ve exported an SSL certificate from a Windows PC via the Certificate Manager MMC plugin into a .pfx file, you may end up needing to spilt that file into its constituent parts (e.g; for moving the certificate to a Linux based server or if you’re importing it into Plesk). Thankfully doing this is very easy.

While this tutorial is Windows orientated, all of the commands we’ll be using can be used on any OS (so long as OpenSSL is installed).

Continue reading

Windows Server How To | Export DS records (trust anchors) after configuring DNSSEC.

After you’ve signed a zone you would expect Windows to give you the DS records/trust anchors straight away, right? Sadly not. It is, however, very easy to get Windows to give you the DS records so you can complete your DNSSEC implementation. To do this you need; a PowerShell or PowerShell ISE window (I prefer ISE), a shared folder with the correct permissions set up so Windows can export everything for you into a file, and a text editor (Notepad++, for example).

Just open up a PowerShell/PowerShell ISE window and copy the following command in (and replace the bits in bold with your details):

Continue reading

Exchange How To | Import and export individual inboxes as .pst files.

Importing and exporting individual user inboxes is a fairly simple process and remains largely the same across multiple releases (nothing has changed in regards to how you do this so far between Exchange 2010 SP1 and Exchange 2016 RTM). Just simply run the following commands in the Exchange Management Shell.

Continue reading

Windows Server How To: Force Redirect to HTTPS in IIS

Forcing IIS to redirect all requests from HTTP to HTTPS is very easy. All you need to do is add the following code to your web.config file (and if it doesn’t exist already, copy the code below in its entirety and open a new file in notepad, paste it in, ‘Save As’ and put web.config in the file name box and select “All Files” for the file type and save it into the root directory of your site (right click on the site you want to redirect in IIS Manager and select ‘Explore’ and save the  web.config there). You can also do this via the GUI, both ways of doing it have been listed below:

Continue reading

Windows Server How To: How to quickly install IIS + all features with one quick line in PowerShell

All you need to do to install IIS in Server 2012 and 2012 R2 super quickly is run the following command in an elevated PowerShell prompt.

Install-WindowsFeature Web-Server -IncludeManagementTools -IncludeAllSubFeature

Windows Server How To: Fix HTTP Error 500 “The FastCGI process exited unexpectedly” error on Server 2012 R2

tl;dr Download and install the 32 bit version of Visual C++ Redistributable for Visual Studio 2012 Update 4 from this link. Refresh page and all should be fixed.

If you’ve installed PHP 5.5 or 5.6 via the WebPlatform Installer on Windows Server 2012 R2 you may have noticed it refuses to work. Every PHP page on your server results in an HTTP 500 error (as seen below). Thankfully, it’s very easy to fix (provided you’ve got the same issue). For some reason the WebPlatform Installer doesn’t automatically install all of the pre-resquites for PHP and that results in the error “HTTP Error 500 – The FastCGI process exited unexpectedly”.

Continue reading

Windows Server How To: Change RDP listening port

There are a couple of reasons you might want to change the RDP port on your Windows Server (e.g; if you’re sitting behind a NAT firewall and have multiple servers you need to administer remotely, or if you want to add some security (even if security by obscurity is stupid). Either way, it’s very simple to do.

Continue reading