for the sheer hell of it, a few weeks ago i wanted to see if i could properly and successfully retain the nginx cache of sysinfo.io and have it persist across system reboots. in order to achieve this goal, i needed to create a shell script, define a new systemd service unit, and find a way to run the systemd script before system shutdown (reboots are included via “before=” declaration). this website is configured to store the nginx cache in its tmpfs file system, which is a special linux in-memory file system that exposes and abstracts itself typically to a […]
this guide will explain how to migrate and dockerize an existing wordpress installation without running apache. most other tutorials i’ve seen combine multiple services inside of one container, while this article tries to maintain the standard of one service per container for easier isolation, troubleshooting, performance, and scale-out. this consists of configuring multiple docker containers with docker-compose on ubuntu 16.04 xenial to run mariadb 10.0.31 or mysql, nginx 1.13, php7.1-fpm and wordpress 4.8. there are many tutorials for creating new wordpress sites with docker containers such as this one, however there aren’t many for those who already have a site and want to migrate existing […]
Chances are this is not the first website you’ve come to after breaking SSL on your Nginx box, but I promise it will be the last. The problem is actually a very simple one, and the Nginx error log tells you verbatim what is wrong with the config, although nginx -t will yield success. Nginx reads and runs the sites in alphabetical order, therefore this issue can be fixed by finding and fixing the site config which is listening on port 443 and using ssl without any ssl certificate declarations which is causing your site further down the alphabetical line to fail HTTPS. In my case it was a Nginx site config called stub_status.conf causing SSL to fail in sysinfo.io.conf even though I did have SSL correctly setup.
nginx can proxy requests using http, fastcgi, uwsgi, scgi, or memcached. in this guide, we will discuss fastcgi proxying, which is one of the most common proxying protocols. nginx has become one of the most flexible and powerful web server solutions available. however, in terms of design, it is first and foremost a proxy server. this focus means that nginx is very performant when working to handle requests with other servers. nginx has built-in support for fastcgi_cache but it doesn’t have a mechanism to purge cached content built-in. so we need to rely on a third-party nginx module. without this 3rd party module, the […]
surprisingly this hasn’t been covered more thoroughly considering how many people are running nginx as a reverse proxy for their back end cms such as wordpress. this article will show you how to configure nginx with ssl and redirect to non-www. if your wordpress installation is sitting behind a reverse proxy like nginx, wordpress won’t be able to see the proper ip address of the client computer for your accurate statistics and reporting. instead wordpress will show your reverse proxy instead of the correct client ip addresses. if you’re using cloudflare then there are various plugins to fix that, for nginx there is not. to […]
How To Create Temporary and Permanent Redirects with Apache and Nginx