安装Nginx
Centos 7
1 | sudo yum install -y nginx |
启动Nginx
1 | sudo systemctl start nginx |
访问localhost, 测试是否启动成功
开始使用Nginx
默认配置文件
1 | # For more information on configuration, see: |
默认配置文件的根目录由下面这行代码决定
1 | root /usr/share/nginx/html; |
检查配置文件是否可用命令
1 | nginx -c nginx.conf |
nginx-mod-echo
1 | sudo pacman -S nginx-mod-echo |