Following the series of bash commands along with its comments to allow Nginx Server and Apache Server to be able to run along with each other. There are two conflicts we are resolving in this article:
- The duplication in port: both of them are listening to the same port 80
- The duplication in default HTML page: this doesn’t matter, it depends on the usage of pointing the server to which service or which static HTML pages. For the further demo purpose of my labs, we will not point both services to serve the same directory. In this case:
/var/www/html
The following are to be added to the default configuration of the nginx server
After that, we can just restart and test for the result
The results should be returned like this below