Install Nginx

There is not a repository for Nginx by default on CentOS7

There are (it turns out) choices of repo to get it from . nginx maintain their own and Fedora also maintain one.

I followed the instructions from digitalocean (see biblio) and used the Fedora repo. There is probably an argument for using the nginx one, but both probably have merit. See the Drupal Groups wiki page (referenced in biblio) for the alternative.

Set up the repo:

yum install epel-release

Install nginx:

yum install nginx

Running

systemctl start nginx

on my VPS failed at this point. Cheking the status with

systemctl status nginx

it was obvious that the port was in use - Apache was running. So stop httpd (apache) and start nginx:

systemctl stop httpd
systemctl start nginx

Checking the Virtuozzo Control Panel showed that it was still running, so not using httpd (must have it's own web-server software, and it listens on a unique port) so it's safe to disable httpd and enable nginx for startup at boot.

systemctl disable httpd
systemctl enable nginx

Visit the server in a browser: http://<ip-address>

This should result in a welcome to nginx type page.