Installation (CentOS/RHEL 7)
Nginx packages are in the EPEL repository:
yum install nginx
Enable at boot and start:
systemctl enable nginx
systemctl start nginx
Configuration (CentOS/RHEL 7)
Main config file:
/etc/nginx/nginx.conf
Virtual hosts
Use a dedicated directory for vhost configs:
/etc/nginx/vhosts/
Include it inside the http block of nginx.conf:
include /etc/nginx/vhosts/*.conf;
Example vhost:
server {
listen 80;
server_name arbitrage.to;
root /var/www/arbitrage.to/website;
location / {
index index.html index.htm;
}
}
Andrew Dorokhov