Configure NGINX Rules to Protect Files on Liquid Web Managed WordPress

Liquid Web is using Nginx server for their Managed WordPress platform. Fortunately, it’s very straightforward to include any custom Nginx rules. In fact, you can add simple redirects, together with adjusting browser cache settings, with a few line of codes.

Here’s how to configure Liquid Web Nginx configuration file for our PDA Gold to work correctly on their hosting server.

1. Embed PDA rewrite rules on Nginx config file

  • Go to your Nginx folder located within your website’s home directory
    • You should see Liquid Web sample configuration file, i.e. user.conf.sample, as a placeholder

  • Create a configuration file if it doesn’t exist yet, i.e. nginx.conf. Actually, any file ending with .conf will do.
  • Put these rules on top of that file
rewrite wp-content/uploads(/_pda/.*\.\w+)$ "/index.php?pda_v3_pf=$1" last;
rewrite private/([a-zA-Z0-9-_]+)$ "/index.php?pda_v3_pf=$1&pdav3_rexypo=ymerexy" last;

2. Restart Nginx server

While you can’t do it by yourself, here’s when their friendly support team comes in useful. Simply drop Liquid Web support a chat message asking them to restart your Nginx server so that our new rules can be applied.

That’s all you have to do. Now our file protection should be working correctly on your website hosted on Liquid Web.

Lasted updated on April 16, 2020