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-74001

Eli's questions

Martin Hope
Eli
Asked: 2019-04-26 08:29:23 +0800 CST

安全限制可以打开的最大文件数

  • 1

服务器可以打开多少个文件?

它是基于ram/cpu的吗?

/etc/security/limits.conf

*    soft     nproc       65536
*    hard     nproc       65536
*    soft     nofile      65536
*    hard     nofile      65536
root soft     nproc       65536
root hard     nproc       65536
root soft     nofile      65536
root hard     nofile      65536

我用它来增加限制,但我想知道这个数字是否65536可以更大?

另外,是否* sfot nproc也涵盖root soft nproc?还是需要为rootand指定*?

ubuntu
  • 1 个回答
  • 119 Views
Martin Hope
Eli
Asked: 2019-02-14 08:49:18 +0800 CST

从所有目录和文件名中删除单引号

  • 1

我最近运行了一个 sed 命令,但我输入了错误的命令(是的,确实发生了)。

所以现在我的目录和文件名看起来像'Call of Duty'. 如何递归返回并重命名所有文件和目录以删除'?

这是我运行的命令find . -type f -name "*.css" -exec sed -i'' -e 's|http://cdn|//cdn|g' {} +

sed
  • 1 个回答
  • 1456 Views
Martin Hope
Eli
Asked: 2016-07-20 22:30:33 +0800 CST

haproxy 503 没有可用于处理此请求的服务器

  • 1

我是 HAproxy 的新手,并且一直在遵循指南来帮助我入门。我想我得到了我需要的设置,但是当我尝试加载我的网站域时,我得到了一个

503 Service Unavailable

No server is available to handle this request.

这是我的 HAproxy 设置:

global
    log 127.0.0.1   local0
    log 127.0.0.1   local1 notice
    debug
    stats timeout 30s
    maxconn 4096

defaults
    log global
    option httplog
    option dontlognull
    mode http
    timeout connect 5000
    timeout client  50000
    timeout server  50000

frontend http-in
    bind *:80
    acl app0 hdr(host) -i mywebsite.com

    use_backend srvs_app0 if app0


backend srvs_app0
    mode http
    balance roundrobin
    option forwardfor
    option httpchk HEAD / HTTP/1.1\r\nHost:localhost
    server host0 10.10.104.41:1038 check


listen stats *:1936
    stats enable
    stats uri /
    stats hide-version
    stats auth someuser:password

我不确定我在寻找什么,或者我可以从哪里开始寻找可能的问题。

我正在寻求帮助,可以为我指明正确的方向,甚至可以指出解决方案。

haproxy
  • 1 个回答
  • 18336 Views
Martin Hope
Eli
Asked: 2016-03-17 10:24:17 +0800 CST

profttp 1.3.5b 在上传时在 wordpress 文件中注入额外的字符

  • 0

我一直试图找出为什么当我使用 ProFTPd 1.3.5b 上传全新的 wordpress 安装时,文件会被注入不属于文件的额外字符。

它只发生在/wp-includes/functions.php我所看到的

这些是我到目前为止打过的针

行~569:

foreach ( $pung as $link_test ) {
        if ( ! in_array( $link_test, $post_links_temp ) ) { // link no longer in post
            $mids = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE %s", $post_ID, $wpdb->esc_like( $link_test ) . '%') );
t // <--- this "t" is added
            foreach ( $mids as $mid )
                delete_metadata_by_mid( 'post', $mid );
        }
    }

线~1780

function win_is_writable( $path ) {

    if ( $path[strlen( $path ) - 1] == '/' ) { // if it looks like a directory, check a random file within the directory
        return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
    } elseif ( is_dir( $path ) ) { // If it's a directory (and not a file) check a random file within the directory
        return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
    }
    // check tmp file for read/write capabilities
    $should_delete_tmp_file = !file_exists( $path );
    $f = @fopen( $path, 'a' );
    if ( $f === false )
        return false;
    fclose( $f );
    if ( $should_delete_tmp_file )
        unlink( $path );
    return true;
}
e // <-- this "e" is added

线~2677

        .button:active {
            background: #eee;
            border-color: #999;
            -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
            box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
            -webkit-transform: translateY(1px);
            -ms-transform: translateY(1px);
            transform: translateY(1px);
        }
        o /* <-- this "o" is added */

        <?php
        if ( 'rtl' == $text_direction ) {
            echo 'body { font-family: Tahoma, Arial; }';
        }

线~3332

function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
    if ( ! is_array( $list ) )
        return array();

    if ( empty( $args ) )
        return $list;

    $operator = strtoupper( $operator );
    $count = count( $args );
    o // <-- this "o" is added
    $filtered = array();

    foreach ( $list as $key => $obj ) {
        $to_match = (array) $obj;

        $matched = 0;
        foreach ( $args as $m_key => $m_value ) {
            if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] )
                $matched++;
        }

        if ( ( 'AND' == $operator && $matched == $count )
            || ( 'OR' == $operator && $matched > 0 )
            || ( 'NOT' == $operator && 0 == $matched ) ) {
            $filtered[$key] = $obj;
        }
    }

    return $filtered;
}

线~3719

function _deprecated_argument( $function, $version, $message = null ) {
    i // <-- this "i" is added

    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action( 'deprecated_argument_run', $function, $message, $version );

    /**
     * Filter whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
        if ( function_exists( '__' ) ) {
            if ( ! is_null( $message ) )
                trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) );
            else
                trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
        } else {
            if ( ! is_null( $message ) )
                trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) );
            else
                trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
        }
    }
}

我通过端口 21 连接,常规 ftp(不是 sftp 或 tls)。也不使用被动模式。

proftpd
  • 1 个回答
  • 73 Views
Martin Hope
Eli
Asked: 2012-07-18 15:12:33 +0800 CST

我有一个指向我的网络服务器的代理服务器,我应该在哪里安装我的 SSL?

  • 3

我刚购买了一个 EV SSL,现在需要一些关于如何安装它的指导。

我遵循了 Geotrust 提供给我的步骤,但我无法弄清楚将我的代理服务器扔到哪里。

该域指向我的代理服务器,然后它很好地代理来自我的第二台服务器的内容。

在我的代理服务器中,我的 httpd.conf 中有这个

<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass / http://xx.xx.xxx.xx:80/ connectiontimeout=300 timeout=300
    ProxyPassReverse / http://xx.xx.xxx.xx:80/
</VirtualHost *:80>

在我的网络服务器中,我有

ServerName domain.com
ServerAlias www.domain.com

DocumentRoot "/var/www/html"

<Directory "/var/www/html">
    AllowOverride All
        Order allow,deny
        Allow from all
</Directory>

我不知道在哪里插入这段代码

SSLEngine on
SSLCertificateFile /path/to/public_ee.crt
SSLCertificateKeyFile /path/to/private.key
SSLCertificateChainFile /path/to/EV_intermediate.crt

如果我将它添加到我的网络服务器,那么我会从代理收到“错误请求”错误,但我仍然可以通过以下方式访问该网址https

关于如何正确配置此类设置的任何线索?

谢谢您的帮助

centos apache-2.2 ssl
  • 1 个回答
  • 273 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