Nginx 的 location 设置
location /img/ {
	alias /var/www/image/;
}

若按照上述配置的话,则访问/img/目录里面的文件时,ningx会自动去/var/www/image/目录找文件

真诚赞赏,手留余香
赞赏
操作系统,前端
Linux 下 configure、make 、make test/make check、sudo make install 的作用
2022-06-28
Node.js
ReferenceError: __dirname is not defined in ES module scope
2022-07-02
ngtwewy
随机推荐
Linux apt 命令
curl 的用法指南
MySQL 字符串截取函数 SUBSTRING_INDEX
MySQL 表名预处理
支持 Selector API 的 HTML 解析器 node-html-parser
MySQL 使用 DATE_FORMAT() 和 FROM_UNIXTIME() 格式化时间
Vue3 挂载全局方法
Debian11 安装笔记1:编译安装Nginx、Naxsi 和 Njs
CSS 滚动条样式修改
Linux 下 configure、make 、make test/make check、sudo make install 的作用

微信联系我

夜间模式切换
回到顶部