301 all URLs but one with Nginx

There may be times you need to redirect all requests away from a domain except for a single URL, for example when redirecting all requests from http to https but leaving one file accessible under http for validation purposes. This post shows how to do this with the Nginx web server.

Fix “access denied” error when parsing HTML as PHP with Nginx

If you are attempting to get files with a .html extension parsed as PHP with Nginx + php-fpm, you might get an "access denied" error in your browser, and the error message "Access to the script ‘…’ has been denied (see security.limit_extensions)" in your Nginx error log. This post shows how to allow html files to be parsed successfully as PHP with Nginx + php-fpm.

PHP upload_max_filesize and nginx

I’ve recently set up a new server with PHP & Nginx using packages from dotdeb. The default upload_max_filesize and post_max_size for this setup with php-fpm is 2M. To adjust it, the Nginx config also needs a configuration change, otherwise you’re still stuck with a 2MB limit.