nginx

Prerequisites

yum -y install pcre-devel

Installation
Download the latest version:

cd /extra/src
wget https://nginx.org/download/nginx-1.27.2.tar.gz
tar zxf nginx-1.27.2.tar.gz
cd nginx-1.27.2

Configure, build and install:

./configure
make
make install

Daemontools Startup
Assuming you have already installed daemontools., create the directories to hold the lighttpd run and logging scripts:

mkdir -p /var/service
cd /var/service
mkdir -m 1755 nginx
cd nginx

Create the run script (/var/service/nginx/run), with the following:

#! /bin/sh
exec 2>&1
exec /usr/local/nginx/sbin/nginx

Once you have saved the file, change it's permissions to it can be executed:

chmod 700 run

Create the logging service:

mkdir -m 755 log
cd log
wget http://qmail.jms1.net/scripts/run.log
mv run.log run
chmod 700 run

Modify /usr/local/nginx/conf/nginx.conf to have it run in the foreground:

daemon off;

Create the symbolic link to start the nginx service

ln -s /var/service/nginx /service/nginx

Resources
Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks

Recent Updates

  • 1 month 21 hours ago
    1.27.2 update
  • 1 month 1 week ago
    Drupal 10/11 config
  • 1 month 1 week ago
  • PHP
    1 month 1 week ago
    PHP 8.3.11 and AlmaLinux
  • 1 month 1 week ago
    New version of Pound