How to Enable Uploads of Files Larger Than 2mb to Your Wordpress Site Using Nginx

How to enable uploads of files larger than 2MB to your WordPress-site (using NGINX)

By Albin / 2020-01-28


I. Configure PHP-FPM

We start by editing the PHP-FPM configuration file php.ini, found here on Debian Buster (replace 7.3 with whatever version you’re running):

nano /etc/php/7.3/fpm/php.ini

Add the following lines at the very end of the file. (Check out what this actually does on https://www.php.net/manual/en/ini.core.php)

upload_max_filesize = 100M
post_max_size = 100M

Reload the PHP-FPM service:

systemctl reload php7.3-fpm

II. Configure NGINX

Now we configure the NGINX website configuration file on the host (note: not on the reverse proxy):

Read More

How to Set Up Wordpress Behind a Secure Reverse Proxy Using Nginx

How to set up WordPress behind a secure reverse proxy using NGINX

By Albin / 2020-01-27


After getting your SSL certificate and enabling HTTPS redirection in NGINX, WordPress will not work due to mixed content (HTTP and HTTPS) – you won’t be able to login.

To fix this:


1. Edit wp-config.php

Add this at the very start of your wp-config.php:

define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
 $_SERVER['HTTPS']='on';

Then, at the end of the file, add the following (replacing website.com with your actual domain):

Read More

Make Debian Lxc Containers More Comfortable to Use

Make Debian/Ubuntu LXC containers more comfortable to use

By Albin / 2020-01-26


I’ve been playing around with Proxmox and LXC containers lately and this is something I do with every container I create for it to be more user-friendly.


1. Enable colors in the terminal

echo "PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '" >> ~/.bashrc

2. Enable tab completion

echo "source /etc/profile.d/bash_completion.sh" >> ~/.bashrc

3. Fix locale problems

echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8

4. Set up automatic package downloads with cron-apt

Install cron-apt:

Read More