3. install nginx
install Nginx
sudo dnf install nginx
# verify the version build and if the installation was successful.
sudo nginx -v
# => 1.14.1
# start the Nginx service.
sudo systemctl start nginx
# verify the status to make sure there are no errors.
systemctl status nginx
nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2022-10-26 00:44:15 EEST; 11s ago
Process: 17479 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
Process: 17478 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Process: 17476 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
Main PID: 17481 (nginx)
Tasks: 2 (limit: 11382)
Memory: 3.7M
CGroup: /system.slice/nginx.service
├─17481 nginx: master process /usr/sbin/nginx
└─17482 nginx: worker process
Oct 26 00:44:15 49pk.l.time4vps.cloud systemd[1]: Starting The nginx HTTP and reverse proxy server...
Oct 26 00:44:15 49pk.l.time4vps.cloud nginx[17478]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Oct 26 00:44:15 49pk.l.time4vps.cloud nginx[17478]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Oct 26 00:44:15 49pk.l.time4vps.cloud systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Oct 26 00:44:15 49pk.l.time4vps.cloud systemd[1]: Started The nginx HTTP and reverse proxy server.
configure Firewall Rules
==wm , we zitten hier, er is geen FW aangezet blijkbaar, want site werkt er zonder vanaf laptop==
zie [[2. install some tools#firewall]]
This install does not automatically add firewall rules to the standard port 80 or 443 ports
set the following rules :
Open port 80 or HTTP:
sudo firewall-cmd --permanent --zone=public --add-service=http
=> FirewallD is not running
Open port 443 or HTTPS:
sudo firewall-cmd --permanent --zone=public --add-service=https
=> FirewallD is not running
Reload firewall to make changes into effect
sudo firewall-cmd --reload
=> FirewallD is not running
sudo systemctl start FirewallD ?
=> Failed to start FirewallD.service: Unit FirewallD.service not found.
test site
http://80.209.239.124 vanaf laptop
=> displays the Index.html page that is distributed with nginx on AlmaLinux.
It is located in /usr/share/nginx/html directory
put your content in a seperate location
edit the root configuration directive in the nginx configuration file /etc/nginx/nginx.conf.
change root /usr/share/nginx/html; to root /home/wmftp/main/wmsite;