首页 > 其他 > 详细

nginx文件服务器

时间:2019-11-06 14:10:20      阅读:60      评论:0      收藏:0      [点我收藏+]
1.安装nginx:
[root@test data]#yum install nginx -y 



2.编辑配置文件: [root@test data]#vim /etc/nginx/nginx.conf 添加如下: autoindex on; ##显示目录 autoindex_exact_size on; ##显示文件大小 autoindex_localtime on; ##显示文件时间 server { listen 80 default_server; # listen [::]:80 default_server; server_name _; # root /usr/share/nginx/html; root /data; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { }

3.重启服务: [root@test data]#systemctl restart nginx

4.访问测试:
技术分享图片

 

nginx文件服务器

原文:https://www.cnblogs.com/ccbyk-90/p/11804516.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!