`
shicheng
  • 浏览: 162376 次
  • 性别: Icon_minigender_1
  • 来自: 泉州
社区版块
存档分类
最新评论

ngnix使用

 
阅读更多

 

1.nginx linux 安装
./configure --prefix=/opt/nginx/ --sbin-path=/opt/nginx/ 
2.nginx启动相关命令

启动:start nginx.exe

重启:nginx -s reload | reopen

停止:nginx -s quit | stop

3.nginx配置

     location /

    {

  expires 30d | 1h #这只缓存时间

  index index.html   #默认首页

  root /data/web/  #html文件的目录

        autoindex on|off (没有默认首页的目录,是否显示文件列表)

        autoindex_exact_size b|kb|mb|gb (文件大小的单位)

        autoindex_localtime on|off (文件的时间)

    }

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics