đHow To Install Nginx Website on CentOS 7
Introduction
NginX
NGINX is open source software for web serving, reverse proxying, caching, load balancing, media streaming, and more. It started out as a web server designed for maximum performance and stability. In addition to its HTTP server capabilities, NGINX can also function as a proxy server for email (IMAP, POP3, and SMTP) and a reverse proxy and load balancer for HTTP, TCP, and UDP servers.
NGINX as a Web Server
The goal behind NGINX was to create the fastest web server around, and maintaining that excellence is still a central goal of the project. NGINX consistently beats Apache and other servers in benchmarks measuring web server performance. Since the original release of NGINX, however, websites have expanded from simple HTML pages to dynamic, multifaceted content. NGINX has grown along with it and now supports all the components of the modern Web, including WebSocket, HTTP/2, gRPC, and streaming of multiple video formats (HDS, HLS, RTMP, and others).
Configuration
Adding the EPEL Software Repository
To add the CentOS 7 EPEL repository, first connect to your CentOS 7 machine via SSH, then use the yum
command to install the extended package repository:
Next, youâll install the actual nginx
software package.
Installing NginX
Now that the EPEL repository is installed on your server, install Nginx using the following yum
command:
Enable NginX Service
Add NginX service to Firewalld
Add Website From Github
Install git
Delete NginX Default Website Display
The default server root directory is /usr/share/nginx/html/
. Files that are placed in there will be served on your web server. This location is specified in the default server block configuration file that ships with Nginx, which is located at /etc/nginx/conf.d/default.conf
.
Add Website From Github
Restart NginX Services
Last updated