安装
sudo yum install epel-release
sudo yum install nginx
启动
sudo systemctl start nginx
检查
systemctl status nginx
配置
# 修改配置
vi /etc/nginx/nginx.conf
# 重新加载配置
nginx -s reload
问题
问题1
Nginx error log: (13: Permission denied)
2020/10/21 07:40:46 [crit] 22844#0: *24 connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream, client: xxx.xxx.xxx.xxx, server: xxxxxx, request: "xxxxxx", upstream: "http://127.0.0.1:8080/xx/index.html", host: "xxxxxxx"
解决
# 执行命令
setsebool -P httpd_can_network_connect 1