Nginx is used as a web server. And you can host multiple websites on one Nginx web server use same or different port number. To achieve this is very easy, what you need to do is to configure multiple websites in Nginx configuration file, then deploy each website content to each related website document root …
In this article I will tell you where Nginx server is installed and how to find out it’s configuration file after installation. It is very useful when you jump into an existing Nginx server and just want to find and modify it’s configuration files.
This article is a continuance of article How To Fix Nginx Redirect To Wrong Website Error When There Are Multiple WebSites. In this article, we will tell you how to enable https to domain test-1.com which use CloudFlare’s CDN service to the domain.
I create two websites www.test-1.com and www.iphone-how-to.com in one Nginx server to demo this example. www.iphone-how-to.com is a real domain with https enabled. And www.test-1.com is a fake domain without enable https, then I add domain to ip mapping record in my local machine’s hosts file to make it accessible.