Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> Services >> HTTP Server >> nginx >> Getting started with nginx in linux

## Prepare to Install nginx in CentOS or RHEL

To add NGINX yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below:

CentOS:

[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1


RHEL:

[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/rhel/$releasever/$basearch/
gpgcheck=0
enabled=1



## Install

yum install -y nginx


## enable/start service

systemctl enable nginx
systemctl start nginx



## Config files

main: /etc/nginx/nginx.conf
includes: /etc/nginx/conf.d/*.conf


## Document Root & Index document

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]