nginx

Prerequisites

yum -y install pcre-devel

Installation
Download the latest version:

cd /extra/src
wget http://nginx.org/download/nginx-1.4.2.tar.gz
tar zxf nginx-1.4.2.tar.gz
cd nginx-1.4.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

  • 2 years 23 hours ago
  • 2 years 1 day ago
  • 2 years 3 days ago
    php 8.x
  • 2 years 4 days ago
    10.6.7
  • 2 years 6 days ago
    Drop Centos 5/6 stuff