Tag archive for: listen

Configuring Nginx for PHP web applications

Nginx and PHP FastCGI Process Manager (FPM) are often used side by side for PHP applications. In such a setting, Nginx will be the first point of contact for incoming HTTP requests, acting as a reverse proxy server for the PHP FastCGI Process Manager.

The PHP FastCGI Process Manager then interprets the HTTP requests that it receives from Nginx and runs the PHP scripts for generating the corresponding HTTP responses for Nginx to return back to the HTTP client.

This post discusses a set of configurations that you can use for configuring Nginx for your PHP web applications.

Configuring Nginx to serve files for a static website

In the world of HTTP, static files are content hosted on a web server that does not change. Some examples of static files include images, CSS files, JavaScript files and HTML files.

Although it is not too hard to implement a dynamic website through a content management framework like WordPress on your own server, there are cases where it makes more sense to just host a couple of static files to realise your website.

Nginx is an excellent web server for serving static websites. If you already have Nginx running on a Raspberry Pi 3 or any other kinds of server, you may want to configure it to serve files for your static website.