美文网首页
Nginx作为文件服务器

Nginx作为文件服务器

作者: Esc_df7c | 来源:发表于2017-08-03 17:59 被阅读0次

配置fileserver.conf

server {

listen      1234;

server_name  192.168.0.240;

#charset koi8-r;

#ccess_log  logs/host.access.log  main;

charset utf-8; # 避免中文乱码

root E:/FTP_ROOT; # 存放文件的目录

location / {

autoindex on; # 索引

autoindex_exact_size off; # 显示文件大小。如果为on,则显示文件的原始大小(bytes)

autoindex_localtime on; # 显示文件时间

}

error_page  404 /404.html;

location = /404.html {

root  html;

}

# redirect server error pages to the static page /50x.html

#

error_page  500 502 503 504 /50x.html;

location = /50x.html {

root  html;

}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80

#

#location ~ \.php$ {

#    proxy_pass  http://127.0.0.1;

#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

#location ~ \.php$ {

#    root          html;

#    fastcgi_pass  127.0.0.1:9000;

#    fastcgi_index  index.php;

#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;

#    include        fastcgi_params;

#}

# deny access to .htaccess files, if Apache's document root

# concurs with nginx's one

#

#location ~ /\.ht {

#    deny  all;

#}

}

查看效果

效果图

相关文章

  • Nginx作为文件服务器

    配置fileserver.conf 查看效果

  • nginx作为文件服务器

    http://www.linuxidc.com/Linux/2014-07/104499.htm使用Nginx在局...

  • CentOS 快速搭建文件服务器

    CentOS 快速搭建文件服务器 CentOS 快速搭建文件服务器 1、安装nginx EPEL 仓库中有 Ngi...

  • Nginx配置虚拟主机

    标签(空格分隔): nginx 1 新增域名为 $host 静态文件服务器 1.1 打开 Nginx 配置文件 /...

  • nginx实现高可用

    大家知道NGINX作为反向代理服务器可以实现负载均衡,同时也可以作为静态文件服务器,它的特点就是并发支持大,单机可...

  • nginx 添加第三方模块

    nginx 添加第三方模块 添加第三方模块 搭建文件服务器 fastdfs + nginx 过程中配置nginx部...

  • nginx部署前端页面

    关于nginx 现在很多网站都是使用 nginx当静态文件服务器和反向代理服务器从维基百科上摘两段话吧 Nginx...

  • 互联网架构体系

    nginx tomcat集群 session redis缓存 fastdfs 图片文件服务器 solr搜索引擎 r...

  • nginx常见技巧

    nginx常见技巧 nginx的用途 一款轻量级的服务器,于前端而言,可以做静态文件服务器,很方便。于后端而言,可...

  • Nginx静态服务配置---详解root和alias指令

    静态文件 Nginx以其高性能著称,常用与做前端反向代理服务器。同时nginx也是一个高性能的静态文件服务器。通常...

网友评论

      本文标题:Nginx作为文件服务器

      本文链接:https://www.haomeiwen.com/subject/zjoplxtx.html