记录一下NGINX配置

禁止IP访问(强制跳转到about:blank):

# ip visit filter
    server {
        listen 4443 ssl http2;
        server_name default_server;

        # 证书
        ssl_certificate     /etc/ssl/nginx/default.crt;
        ssl_certificate_key /etc/ssl/nginx/default.key;

        rewrite ^/(.*)$ about:blank permanent;
        error_page 497 about:blank;
    }

webdav服务器(htpasswd验证密码可在https://tool.oschina.net/htpasswd生成)

# webdav-video
    server {
        listen 4443 ssl http2;
        server_name yourserver.com;

        # 证书
        ssl_certificate     /etc/ssl/nginx/yourserver.com.crt;
        ssl_certificate_key /etc/ssl/nginx/yourserver.com.key;

        charset utf-8,gbk;
        location / {
            alias /mnt/Videos/;
#            autoindex on;
            dav_methods PUT DELETE MKCOL COPY MOVE;
            dav_ext_methods PROPFIND OPTIONS;
            create_full_put_path on;
            client_max_body_size 0;
            dav_access user:r group:r all:r;
            auth_basic "Authorized Users Only";
            auth_basic_user_file webdav.htpasswd;
        }
    }

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇