Acceso

nodejs服务器访问txt文件

Autor:neo yang Tiempo:2022/04/15 Leer: 3865

nodejs的服务器,访问根目录的txt文件。

无法访问。

我一直以为是nodejs服务器的反向代理造成的。

今天发现不是。

而是nginx服务器的配置造成的。

做了一些修改

location ~ .*.(js|css|txt)?$     #这里加入|txt即可。
{
expires 12h;
error_log off;
access_log /dev/null;
}
etiquetas:


copyright © www.lyustu.com todos los derechos reservados.
Tema: TheMoon V3.0 Autor:neo yang