How-to: Get Started with Nginx

Follow these steps to install Nginx on Linux and configure PHP support, virtual hosts, HTTP authentication, SSL support, URL rewrites, and load balancing

Become An Insider

Sign up now and get FREE access to hundreds of Insider articles, guides, reviews, interviews, blogs, and other premium content. Learn more.

Although the most popular Web server in the world is still Apache, Nginx is cutting into that market share in a very significant way. Both versatile and extremely fast, Nginx generally performs faster than Apache right out of the box, especially when serving static content or acting as a reverse proxy server. It's used to serve content for many extremely large-volume websites.

In this how-to, we’ll show you how to get started with Nginx on Fedora, CentOS, and Ubuntu Linux distributions. In addition, we’ll install PHP-FPM to handle dynamic PHP content.

Installing Nginx on Fedora and CentOS

Nginx can run even while Apache is installed on the same system, but we need to make sure Apache is not running at the same time, or at least on the same ports. So let’s make sure Apache isn’t running or set to run at startup. We do that on most Fedora and CentOS installations via the following commands, run as root or with sudo:

$ sudo -i

To continue reading this article register now

Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.