1,在nginx.conf配置文件加上圈中的代码
#加上下面这个直接可以把服务器变文件夹
location /upload {
alias html/upload;
autoindex on;
}
2,输入地址看效果
放上全部配置
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote