1. 下载源代码
 
2. DAV模块缺省没有编译,要加入编译选项

# ./configure --with-http_dav_module

 
# make install
 
# cd /usr/local/nginx/sbin
 
# ./nginx
 
# ps -ef | grep nginx
 
# ps -ef | grep nginx
root     
7330    
1  0 22:46
?       
00:00:00 nginx: master process ./nginx
nobody   
7331  7330  0 22:46
?       
00:00:00 nginx: worker process
 
# ./nginx -h
nginx version: nginx/1.4.2
Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g
directives]

Options:
 
-?,-h        
: this help
 
-v           
: show version and exit
 
-V           
: show version and configure options then exit
 
-t           
: test configuration and exit
 
-q           
: suppress non-error messages during configuration testing
  -s
signal    
: send signal to a master process: stop, quit, reopen, reload
  -p
prefix    
: set prefix path (default: /usr/local/nginx/)
  -c filename  
: set configuration file (default: conf/nginx.conf)
  -g directives : set global directives out of
configuration file

 
 
2. WebDav设置
nginx的缺省html目录/usr/local/nginx/html,
为了以后的WebDav测试,先简单将权限设置为777
# chmod 777 /usr/local/nginx/html
 
nignx 源代码不包含digest认证模块
 
下载digest模块并解压到目录nginx-http-auth-digest-master
 
# ./configure --with-http_dav_module
 --add-module=nginx-http-auth-digest-master
 
nginx WebDav的配置: (http://wiki.nginx.org/HttpDavModule)
修改/usr/local/nginx/conf/nginx.conf
 
location / {
           
root   html;
           
index  index.html index.htm;
           
dav_methods  PUT DELETE MKCOL COPY MOVE;

create_full_put_path   on;
           
dav_access      
     
   all:rw;
       
}

 
用curl测试上传:curl
-T test.txt http://127.0.0.1/test.txt
 
 

nginx
digest认证的配置:

 
创建密码文件:
# htdigest2 -c /usr/local/nginx/conf/webdav.passwd WebDAV-Realm
steve
Adding password for steve in realm WebDAV-Realm.
New password:
Re-type new password: 
 
修改/usr/local/nginx/conf/nginx.conf
auth_digest_user_file /usr/local/nginx/conf/webdav.passwd;
       
auth_digest_shm_size 4m;   # the
storage space allocated for tracking active sessions

location / {
           
root   html;
           
index  index.html index.htm;
           
dav_methods  PUT DELETE MKCOL COPY MOVE;

create_full_put_path   on;
           
dav_access            
all:rw;

auth_digest 'WebDAV-Realm'; # realm name
           
auth_digest_timeout 60s; # allow users to wait 1 minute between
receiving the
                                    
# challenge and hitting send in the browser dialog box
           
auth_digest_expires 10s; # after a successful challenge/response,
let the client
                                    
# continue to use the same nonce for additional requests
                                    
# for 10 seconds before generating a new challenge
            
auth_digest_replays 20; # also generate a new challenge if the
client uses the
                                    
# same nonce more than 20 times before the expire time limit
       
}

 
再用curl上传(没有用户名和密码)会失败
# curl
-T test.txt http://127.0.0.1/test.txt

Suse linux 11 SP2 nginx 使用笔记的更多相关文章

  1. SUSE LINUX 11忘记密码的解决方法

    忘记ROOT的密码 1.重新启动机器,在出现grub引导界面后,在启动linux的选项里加上init=/bin/bash,通过给内核传递init=/bin/bash参数使得OS在运行login程序之前 ...

  2. 在 SUSE 11 sp2 上安装 freeradius

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html 内部邀请码:C8E245J (不写邀请码,没有现金送) 国 ...

  3. 安装MySQL -- SuSE Linux Enterprise Server 11 SP3

    1.准备工作从MySQL官网上分别下载mysql服务器端于客户端包: MySQL-server-5.5.49-1.sles11.x86.rpm MySQL-client-5.5.49-1.sles11 ...

  4. SUSE Linux Enterprise Server 11 SP1安装图解教程

    一.说明:操作系统:SUSE Linux Enterprise Server 11 SP1下载地址:需要注册才能下载二.安装系统 用启动盘成功引导之后,出现下面的界面 系统运维 温馨提醒:qihang ...

  5. SUSE Linux Enterprise 11 离线安装 DLIB python机器学习模块

    python机器学习模块安装 环境:SUSE Linux Enterprise 11 sp4  离线安装 说明:在安装dlib时依赖的基础 环境较多,先升级gcc,以适应c++ 11的使用:需要用到c ...

  6. 在SUSE Linux Enterprise 11 SP1上用UDEV SCSI配置ASM

    1. 编辑/etc/scsi_id.config文件,如果该文件不存在,则创建该文件,添加如下行: options=–whitelisted –replace-whitespace 2. 获取需要绑定 ...

  7. 虚拟机vmware10.0.0里设置Suse Linux Enterprise 11系统静态IP上网

    http://blog.csdn.net/usbdrivers/article/details/50035615 首次在虚拟机里安装Suse Linux Enterprise 11,采用NET方式能够 ...

  8. SUSE Linux Enterprise 11 SP4系统安装过程 字符界面

    首先开启虚拟机之后显示这个界面: (1) 进入之后显示下面界面,点击Installation安装. (2)进入Welcome界面,选择语言,默认Einglish(US)不需要改动:点击I Agree ...

  9. SuSe Linux Enterprise Server 10 With Sp2 安装过程图解

    SuSe Linux Enterprise Server 10 With Sp2 安装过程图解 650) this.width=650;" style="border-right- ...

随机推荐

  1. cocos2d-x3.0环境搭建(基于win7以及mac)

    流程概览: Windows平台 一.安装 Python与配置Python环境变量 二.安装Cocos2d-x,并创建项目 Mac平台 安装Cocos2d-x,并创建项目 具体操作: 一.安装Pytho ...

  2. 李洪强漫谈iOS开发[C语言-004]-开发概述程序设计语言程序编译过程

    汇编语言 指令用特定的名字来标记,这就是汇编语言 人比较容易看懂汇编语言 汇编直接和程序一一对应的 有汇编器把程序翻译成机器码 把高级语言编译成计算机识别的语言 程序编译过程 命令行 UNIX 系统中 ...

  3. MDK4.6和J-LINK调试出现问题,软件自动关闭,在网上收集整理的解决办法

    MDK4.6配J-LINK调试时提示升级,升级完成后,弹出下图提示框后,软件自动退出. 提示原因:由于MDK4.6能识别山寨JLINK导致.网络牛人分析如下: 今天将Keil MDK升级到了V4.54 ...

  4. 创建新进程,就三个函数CreateProcessAsUser CreateProcessWithLogonW CreateProcessWithTokenW(附网友的流程)

    CreateProcessAsUser 怎么会还需要密码呢~~~ 先WTSGetActiveConsoleSessionId 得到当前的处理激活状态的SessionId OpenProcessToke ...

  5. 屏幕实战效果解析:IPS/TFT/AMOLED/SLCD

    现在手机市场上,智能手机种类繁多,手机屏幕材质也是五花八门.对于一般消费者来说,一款手机是否值得购买,除了关心它的硬件参数以外,更重要的一点就是看它的屏幕.除了屏幕尺寸以外,影响着大家对该手机的第一感 ...

  6. UML系列01之 UML用例图

    UML,全称是Unified Modeling Language,中文是"统一建模语言".通俗点说,UML是一种创建模型的语言. UML是在开发阶段,说明,可视化,构建和书写一个面 ...

  7. mysql代码里面有中文注释导致语法错误

    一个简单的创建表的代码 DROP database IF exists reg_login; CREATE database reg_login; use reg_login --用户表 create ...

  8. android开发 eclipse alt+”/”自动提示失效

    http://blog.unvs.cn/archives/android-eclipse-alt.html 按照其中的第一条+第二条 处理 注意:abcd要替换为 abcdefghijklmnopqr ...

  9. perl install module as non-root user

    install to local directory. 1. cpan 初始化,不用local::lib,mannual就行,其他auto2. 修改cpan 配置文件 cpan > o conf ...

  10. Uubuntu 14.04 LTS反编译apk

    使用apktool反编译apk 1.安装apktool apktool是Google提供的APK编译工具,能够反编译及回编译apk,需要Java环境的支持(在此不再赘述Java的安装与配置,详见< ...