1. 先配置nginx,配置代理,根据路径跳转到linux存放共享文件目录:
autoindex on;# 显示目录 autoindex_exact_size on;# 显示文件大小,这个变量控制文件大小精确展示还是友好展示,on精确展示,展示的是字节数,false展示的是MB autoindex_localtime on;# 显示文件时间 server { listen 9696 default_server; listen [::]:9696 default_server; server_name _; #root /usr/share/nginx/html; root /data/; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } }
2. 启动nginx
cd /usr/local/nginx nohup ./nginx & ps -ef | grep nginx
.3 页面访问:
http://xxx.xxx.xxx.xxx:9696/
标签:展示,xxx,server,nginx,html,location,服务器,搭建 From: https://www.cnblogs.com/zhf123/p/18421028