Compiling the HTTP Substitutions Filter module for NGINX on CentOS 7

I use NGINX for various things, including one niche case, where I rewrite and replace strings before presenting them to the user. I do this using the HTTP substitutions filter module. The readily-compiled module to accomplish this is included with the paid NGINX Plus, but is also available to DIY compile if you have the ability.

If you're just looking for precompiled .so files you can use with NGINX on CentOS 7 available from the nginx.org repository, see the end of this post.

A while ago I took the time to work out how to compile this for updates; the CentOS box I run NGINX on uses yum packages for updates, but then the subs filter module stops working. So, after half an hour or so of tinkering, quiet swearing, obtaining of additional packages, tweaking commandlines etc... I have a working oneliner to make an NGINX build which will also compile a suitable ngx_http_subs_filter_module.so file. 

To compile this dynamic module you generally need to build with the same switches used for the packaged build. So, first step was to find out how it was compiled:

See how to check your compile flags, and how to build from source

Guide: Creating more professional livestreams with OBS & VoiceMeeter

I've used VoiceMeeter for years. It can be confusing at first, but its powerful features make it an invaluable tool. 

During this time, quite a few people have asked me about how to configure VoiceMeeter and OBS for their own streaming needs. More recently, questions about setting up a livestream or podcast streaming setup for going live on the web-based Melon and more fully-fledged Restream.io services prompted me to update and publish a guide I'd had in my drafts for some time. 

If you're a PC streamer, it's worth familiarising yourself with OBS and VoiceMeeter. This combo is really useful and opens up a tremendous amount of flexibility. 

There's a lot I haven't covered in this first guide. I've barely scratched the surface of optimising OBS for recording and streaming, particularly as there is so much to cover depending on whether you are Intel/AMD or NVidia/AMD for graphics, whether you have one or two machines for presenting/gaming and streaming... NDI also creates more possibilities in this regard.

And with regard to VoiceMeeter, there's also more to cover - VBAN (low latency, uncompressed networked two-way audio), VoiceMeeter's processing and effects, the wonderful virtual insert feature which lets you route audio into a DAW via ASIO and back into VoiceMeeter as an insert... All incredibly powerful features. 

I'll write further guides covering these - please leave a comment or tweet me with what you'd like to see. Likewise, if you spot any errors, please leave a comment or contact me on social media.

What is VoiceMeeter?

How to make read-only 'virtual' exFAT directories for FTP users on Synology NAS running DSM 6

Update, December 2019: installing third-party scripts or package managers which run on boot may overwrite the file /etc/rc.local which I initially recommended using. I've revised this article to recommend a better autostart script directory; feel free to borrow the simple start/stop script I included at the end of this post.

I recently purchased a Synology NAS running DSM 6, and sharing directories via FTP is easy. In Control Panel, make sure the Shared Folder is defined, then using File Station, define access permissions (read, write, execute) for each group or user.

If you want an additional user for FTP access, you make your user (or make a group then add your user to that) then Allow access to the FTP application inside Control Panel -> Users or Groups. The permissions are inherited, UNIX style, to effectively restrict rights over folders and their files.

So far, so simple; this works great for everything on the NAS' internal storage, because by default it uses EXT4 filesystem which supports file & directory permissions and ACLs. On the terminal, a plus symbol at the end of an ls directory listing denotes the file or directory has additional ACLs applied, which can overrule standard UNIX permissions.

However, on any external drives connected to the Synology, for example a large USB3 drive for temporary storage of additional material, those drives may use file systems other than EXT4 so they're accessible by, say, Windows PCs. In this case, given we're probably also dealing with very large files, exFAT is a sensible choice - and the Synology does support exFAT, albeit there's a long story about that. tl;dr - pay $4 and just get the official exFAT Access package from Synology through the Package Manager, it's zero-hassle and has full read/write support. More info on supported external devices here.

One thing exFAT volumes lack when used through the Synology is support for any UNIX file and directory permissions. Normally that's acceptable, but if you're sharing files to other users, either via NFS, SMB or FTP, you may wish to use permissions to prevent accidental deletion - and on an exFAT volume, this means you can't.

But we can do read-only access with exFAT! It just requires some creative thinking...

Click to read the article and find out how

Dear mailserver operators: PLEASE stop using SSLv3!

I look after a few email servers and after implementing much stricter encryption settings at the start of the year, I noticed some emails were never making it to accounts - being rejected at the negotiation stage (where the remote server sending the email agrees an encryption protocol and cipher with the local server).

I was puzzled by this. TLS is hardly new, yet these servers were only ever attempting to use SSLv3 and then failing to 'upgrade' to TLS - not even TLS1.0. Poor show.

This isn't unique either - I periodically run a script which reports the spread of protocols and ciphers of incoming email connections; here's a sample from one server for the last hour...

...The stats don't make for pretty reading:
I ♥