Sysadmins of the North (Page 10)

Technical SysOps blog, where topics include Sysadmin, DevOps, computers, servers, web, MySQL, database, virtualization, optimization and security

Install Varnish Cache on CentOS 6.7

In this article I'll show you how to install Varnish Cache on CentOS, version 6.7 in this case. Varnish is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Because Varnish Cache is really, really fast, web applications like WordPress, Drupal and Joomla can greatly benefit from Varnish Cache.

Read more...

Install Elasticsearch on CentOS 6.7

How to install Elasticsearch on CentOS 6.7. Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyze big volumes of data quickly and in near real time. In this article we'll go over the steps to install Elasticsearch on CentOS 6.7.

Read more...

Minify WP-Super-Cache HTML cache files: WPSCMin a WP-Super-Cache plugin

The WordPress WP-Super-Cache cache plugin doesn't minify HTML cache files, which I find a disadvantage. Knowing minify libraries, I went looking for an existing solution (why reinvent the wheel?), and found one: WPSCMin. Read on ...

Read more...

SQL Server versions list

How to identify your Microsoft SQL Server version, build and edition.

Generate pseudo-random passwords with OpenSSL

OpenSSL comes in handy when you need to generate random passwords, for example for system accounts and services. In this short post I'll give you a quick example on how to generate random passwords with OpenSSL in Linux (Bash), Windows and PHP.

Always_populate_raw_post_data setting in PHP 5.6 & Magento 2.0

How to fix upgrades to Magento 2.0 in PHP 5.6 and higher: PHP 7+.

PowerShell return value, exit code, or ErrorLevel equivalent

Here is how you can verify whether an external command in PowerShell was executed successfully or not by checking its errorlevel. Simply by verifying the PowerShell exit code using the $? operator or $LASTEXITCODE.

Read more...

RewriteProxy with .htaccess in IIS

In my case scenario, I had to proxy requests in IIS, because a website was moved from web server A to B, and the DNS wasn't updated yet. All HTTP requests for the moved website are handled in IIS' Default Web Site; that's the wildcard host, and the original host no longer existed there. We needed to match our website and proxy those requests to the new IIS web server. This can either be done using a proxy with URL Rewrite Module, IIS Application Request Routing (ARR), or .htaccess file handled by Helicon Ape.

Get Hyper-V guest serial number with PowerShell

Learn how to retrieve the Hyper-V virtual machine's serial number with PowerShell

How to block BaiduSpider bot User-Agent?

The Baidu spider (BaiduSpider user agent) can be a real pain to block, especially since it does not respect a robots.txt as it should. This post shows you how to block Baidu Spider bot, using IIS URL Rewrite Module based on its User-Agent string.

Optimize PHP's OPcache configuration

Now that you've optimized PHP realpath_cache_size, it's time to fine-tune PHP OPcache. With just a few tweaks you can tune OPcache to make it perform much better, and here is how! ...

Read more...

How to add conditional analytics tracking code in WordPress Multisite

Learn how to conditionally add Google Analytics tracking code to your WordPress Multisite

Add a delay to your WordPress login form

It is important to protect your WordPress website from brute-force attacks, and various security exist in doing so, but don't blatantly copy from other sites without proper testing, as this post points out.

My WordPress web.config

Do you host your WordPress website on Windows Server IIS? And are you having trouble with your web.config? I often receive questions about how to use a web.config file in WordPress on Windows Server, and which settings are important for a WordPress site. Maybe it's because I'm a WordPress on Windows Server IIS enthusiast, so here is my web.config for your convenience (really, it's not that special).

Read more...

How to enable HTTP Strict-Transport-Security (HSTS) on IIS

Set up HTTP Strict-Transport-Security (HSTS) response header in Windows Server IIS 10, here is some more technical information about HSTS in IIS, and other security headers...