AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-58542

sweb's questions

Martin Hope
sweb
Asked: 2019-10-02 01:52:06 +0800 CST

ipset iptables 丢弃所有排除端口,但通过速率限制

  • 0

我有简单的 ipset 地图来跟踪可疑的 ip。

这些我的命令:

ipset flush
ipset -q destroy banlists
ipset create banlists hash:ip comment family inet hashsize 2048 maxelem 1048576 timeout 300

如果在 ipset 中匹配,我会告诉 iptables 丢弃:

iptables -I INPUT 1 -m set -j DROP --match-set banlists src
iptables -I FORWARD 1 -m set -j DROP --match-set banlists src

这是有效的,但我想

  • 所有端口都必须丢弃
  • 排除端口 80 和 443
  • 速率限制匹配 ipset 以防止 ddos​​ 但可接受
iptables
  • 1 个回答
  • 312 Views
Martin Hope
sweb
Asked: 2016-11-17 08:17:21 +0800 CST

共享和复制文件系统支持 POSIX

  • 3

我正在寻找支持我的用例的开源解决方案。我的集群网络上现在有 4 个节点,我需要这个。

  1. 存储文件系统(巨大的列表)
  2. 复制我的文件保存在一个节点上并复制到另一个节点。
  3. 将我的文件分成两部分。(1 个集群,2 个复制,2 个共享)
  4. 我可以将节点添加到我的网络(2 个新节点,并且我的分片大小将增加)重要的一个
  5. 很高兴听到我可以使用跨数据中心复制来放置 geodns,以便客户更快地访问。
  6. 也支持POSIX

就这么简单

共享和复制文件系统

我需要知道任何流行的 DFS 支持我的用例还是我必须将其作为应用层?

ceph glusterfs
  • 1 个回答
  • 85 Views
Martin Hope
sweb
Asked: 2016-01-15 01:50:08 +0800 CST

将所有 dns 服务器作为主区域有什么问题

  • 0

我想使用绑定配置 4 个 dns 服务器。将它们全部配置为没有 dns 传输的主机是否有任何问题。

# server one
zone "example1.com" {
    type master;
    file "example1.com.zone";
    allow-update { none; };
    allow-transfer { none; };
};

# server two
zone "example1.com" {
    type master;
    file "example1.com.zone";
    allow-update { none; };
    allow-transfer { none; };
};

文件example1.com.zone是完全相同的数据。

bind
  • 2 个回答
  • 1422 Views
Martin Hope
sweb
Asked: 2013-08-19 03:06:45 +0800 CST

nginx上传进度结合正常请求

  • 15

我有一个很好的 nginx 虚拟主机,它在不使用 nginx 上传模块的情况下运行良好。 当我将上传进度添加到我的上传请求中时。我该如何解决这个问题?我需要使用或使用或其他方式上传我的文件/?r=upload并/upload?foo=bar跟踪上传进度数据/progress。

# static9-localhost.sweb
server {

        # upload limit
        # upload_limit_rate 10240;

        # request size limitation
        client_max_body_size 500m;
        client_body_buffer_size 64k;

        # document root
        root /path/to/webapp/static/public/;

        # index file
        index index.php;

        # server name
        server_name static9-localhost.sweb;

        # rewrite rules
        rewrite "^/thumbnail/([A-Za-z0-9]{12})/(.*)/.*$" /index.php?r=thb&unique=$1&prm=$2 last;

        # /
        location @frontcontroller {
                # expires
                expires max;

                # disable etag
                if_modified_since off;
                add_header 'Last-Modified' '';

                # mvc rewrite
                try_files $uri $uri/ /index.php?$uri&$args;
        }

        # upload progress
        location /upload {
                upload_pass @frontcontroller;
                track_uploads proxied 600s;
        }

        # progress
        location = /progress {
                report_uploads proxied;
        }

        # error pages
        error_page 404 /index.php?r=404;
        error_page 403 /index.php?r=403;
        error_page 500 501 502 503 504 /index.php?r=500;

        # php5-fpm
        location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9003;
                fastcgi_index index.php;
                fastcgi_read_timeout 300;
                include fastcgi_params;
        }

        # logs
        access_log /path/to/webapp/logs/static_access.log;
        error_log /path/to/webapp/logs/static_error.log;
} 

对于上述虚拟主机,我的上传请求/upload/?X-Progress-ID=QLiFKnG5A81K冻结。问题是什么?

/?r=blahblah如果我将上传文件发送到/uploadusing中,我也需要这样的请求才能正常工作/?r=upload。

nginx
  • 1 个回答
  • 1545 Views
Martin Hope
sweb
Asked: 2013-01-03 14:14:59 +0800 CST

nginx gzip 不适用于 php js 和 css 处理器

  • 1

我有一个资产管理器,用于通过 php 处理 css 和 js。我正在使用 nginx 和 php5-fpm 来加载我的应用程序。但返回的 css 和 js 文件未 gzip 压缩。

例如我的 url 是 http://mysite.com/phpcssprocessor/mycssfile.css这个通过 php 生成的文件。

这是我的虚拟主机配置:

# /
    location / {
        # gzip
        gzip on;
        gzip_static on;
        gzip_proxied any;
        gzip_types application/javascript application/json application/x-javascript application/xml text/css text/javascript text/plain text/x-component text/xml;

        # disable etag
        if_modified_since off;
        add_header 'Last-Modified' '';

        # mvc rewrite
        try_files $uri $uri/ /index.php?$uri&$args;
    }
php
  • 2 个回答
  • 3400 Views
Martin Hope
sweb
Asked: 2012-11-06 00:40:04 +0800 CST

为所有用户运行脚本

  • 0

我在 /etc/profile.d/myscript.sh 中将一些脚本放在我的 ubuntu linux 上,但它只适用于我的用户。

但它只在用户登录时有效,当我使用 sudo 时则无效。

# myscript.sh
export MYVAL="HELLO"

echo $MYVAL // HELLO

sudo echo $MYVAL // ?!
bash
  • 1 个回答
  • 152 Views
Martin Hope
sweb
Asked: 2012-05-18 21:11:39 +0800 CST

将文件夹复制并替换为另一种最快的方式 - linux bash

  • 2

我有三个文件夹:core、project和merge里面有很多文件。我想删除merge文件夹里面的所有文件和文件夹(包括dot文件),然后将core文件夹中的所有文件(包括dot文件)复制到merge文件夹中,同时将project文件夹中的所有文件合并到merge中文件。

情况

  1. 如何从特殊文件夹中删除所有文件和文件夹(包括点文件)而不删除它们?(rm -rf /path/to/folder/*没有删除文件和文件夹。)
  2. 将所有文件从特殊文件夹递归复制(有和没有合并和替换)到另一个文件(包括点文件)的最快方法是什么?( tar -cf my.tar path/; tar -xf my.tar)

我正在使用 tar,但文件太多,我需要一种更快的方法。

linux bash cp
  • 1 个回答
  • 4589 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve