nginx
root与alias
root选项会将 root地址+location地址拼接成一个Linux路径。
alias则指定了一个绝对路径,不会拼接locationlocation /html {
root /public;
}
此时nginx看到/public/html/index.html后,发现有html路径,
找到location /html, 因为是root最终Linux路径为
root + location ——> /public/htmllocation /html {
alias /public/html;
}
此时nginx看到/public/html/index.html后,发现有html路径,
找到location /html, 因为是alias,最终Linux路径为alias路径
alias ——> /public/htmlnginx简单的调试
url截取(重新)
缩略图
多域名配置导致www配置失效的问题
Last updated