其实很简单,代码如下:
server {
listen 80;
server_name www.xxoo.local;
root D:/data/www/xxoo/www;
index index.php index.html index.htm;
error_page 404 /404.html;
location = /404.html {
return 404 'Sorry, File not Found!';
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html; # windows dir
}
location / {
try_files $uri @rewrite;
limit_rate 100k; #这里限制带宽
}
惯例,有图有真相