Admin
rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
sudo yum install nginx
sudo systemctl start nginx
mkdir /root/www
vim /etc/nginx/nginx.conf
# user nginx;
user root;
location / {
root /root/www;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
sudo systemctl restart nginx
mkdir /root/www/files
echo "hello" > /root/www/files/hello.txt
curl 127.0.0.1/files/hello.txt
sudo systemctl enable nginx
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload