Nginx搭建文件服务器
配置
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
# 显示目录
autoindex on;
# 显示文件大小
autoindex_exact_size on;
# 显示文件时间
autoindex_localtime on;
# 防止中文乱码
charset utf-8;
server {
listen 80;
server_name localhost;
#location / {
# root html/mp;
# try_files $uri $uri/ /index.html;
# index index.html index.htm;
#}
location /thressjs {
alias D:\\WorkProjects\\VSCodeProjects\\learning-threejs\\;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}