The nginx
application is installed on system-2
and is configured as follows.
The /etc/nginx/nginx.conf file is shown below. Changes from the distributed file are highlighted :
user nginx;
worker_processes 3;
worker_cpu_affinity auto 1110;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log off;
sendfile off;
keepalive_timeout 300s;
keepalive_requests 1000000;
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_errors off;
include /etc/nginx/conf.d/*.conf;
}
The /etc/nginx/conf.d directory contains only the default.conf file, shown below. Changes from the distributed file are highlighted:
server {
listen nn.nn.nn.nn:80 reuseport;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
where nn.nn.nn.nn is the IP address of the
system-2
adapter port that will receive the
HTTP requests.
A zero-byte file is created in the root of the nginx
server:
# touch /usr/share/nginx/html/0kb.bin