Category: Nginx Web Server

Tips, tricks, tutorials and troubleshooting articles for the Nginx web server

Nginx (pronounced “Engine-X”) is an open source Web server and a reverse proxy server with a strong focus on high concurrency, performance and low memory usage. It can deploy dynamic HTTP content on a network using FastCGI, SCGI handlers for scripts, uWSGI application servers or Phusion Passenger module, and can serve as a software load balancer.

I don’t use Nginx currently on any of my own web servers, but I do manage a customers images server which uses Nginx.

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.

Read More ?

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.

Read More ?

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.

Read More ?

Get the arguments used to configure Nginx source

I’m currently managing an images server for a customer that uses Nginx on an old Debian 5 install. At some point they installed a version of Nginx from source, and I wanted to be able to install an updated version from source using the same command line arguments for the configure command.

Read More ?