Node-red. & NGINX on Centos 8

  • 11 Jun, 2020

I am creating a server (Centos 8) to develop a system that will use an application using REACT as a front end to show data from different sensors.I will use NGINX as a webserver and Node-red as a back end.In this first post I describe how to install NGINX.

Install nginx package using the yum command on CentOS 8:

sudo yum update sudo yum install nginx

Update firewall settings and open TCP port 80 and 443. Run:

sudo firewall-cmd –permanent –zone=public –add-service=https –add-service=http sudo firewall-cmd –reload

Enable nginx service by running systemctl command so that it starts at server boot time:

sudo systemctl enable nginx

start the service, run:

sudo systemctl start nginx

Commands to start/stop/restart nginx server

Run command as per your needs.

sudo systemctl start nginx  <– start the server ## sudo systemctl stop nginx  <– stop the server ## sudo systemctl restart nginx  <– restart the server ## sudo systemctl reload nginx  <– reload the server ## sudo systemctl status nginx  <– get status of the server ##

You must open and enable port 80 and 443 using the firewall-cmd command:

sudo firewall-cmd –permanent –zone=public –add-service=http –add-service=https sudo firewall-cmd –reload sudo firewall-cmd –list-services –zone=public

Now nginx is installed. Bellow are some important directories (defaults) i

Config directory – /etc/nginx/ Maibn global config file – /etc/nginx/nginx.conf TCP ports opened by Nginx – 80 (HTTP), 443 (HTTPS) Default web document root directory – /usr/share/nginx/html Access log file – /var/log/nginx/access.log Error log file – /var/log/nginx/error.log

Related Posts

Error when run dnf install rpm-build

  • 31 Mar, 2025

I was installing the IBM MQ Server on a linux box yesterday. I got the error bellow: \root@gateway MQServer\ dnf install rpm-build
Updating Subscription Management repositories.
Instana 14 B/s |

Error when run dnf install rpm-buildRead More

How to Install watch on macOS Sequoia

  • 06 Feb, 2025

The watch command is a useful utility in Unix-like systems that allows you to execute a command periodically and display its output. However, macOS does not come with watch pre-installed. If you're ru

How to Install watch on macOS SequoiaRead More

rsync is faster than scp to copy files between machines

  • 31 Dec, 2024

rsync is generally faster than scp for copying files, especially when transferring a large amount of data or syncing directories. Here's why: 1. Incremental Transfers - rsync: Only transfers the p

rsync is faster than scp to copy files between machinesRead More