http {
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
server {
# 监听的端口
listen 80;
# 监听地址
server_name yourdomain.com, www.yourdomain.com;
limit_req zone=one burst=5;
# 默认请求配置
location / {
# 默认网站根目录 var/www
root /var/www/html/xxx;
# 欢迎页
index index.html index.htm;
}
}
}
检查文件路径是否配置正确
ls /var/www/html/xxx