slizh
By:
slizh

how to set up 2 sites on one server Linux in conjunction nginx + apache

December 11, 2016 283 views
Nginx Apache CentOS

How to install and configure the 2 sites on a single Linux server in conjunction nginx + apache on centos 6.
If you can throw off the manual

1 Answer

You don't really need both Apache and Nginx, all sites will work with one, but in some cases you want to do so.
There is Ubuntu tutorial for it but it still can apply to CentOS: How To Configure Nginx as a Reverse Proxy for Apache.

To set up multiple sites, Virtual hosts for Apache and Server Blocks for Nginx will do th job:
How To Set Up Apache Virtual Hosts on CentOS 6.
How To Set Up nginx Virtual Hosts (Server Blocks) on CentOS 6.

by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache on Centos
Have another answer? Share your knowledge.