小编moe*_*sef的帖子

RequireAny apache2 错误

我正在尝试使用 RequireAny 来允许从某个 IP 或某个用户​​名访问站点。但是,当我尝试运行 apache 时,出现以下错误:

Invalid command '<RequireAny', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
Run Code Online (Sandbox Code Playgroud)

我的带有身份验证的 apache 文件部分如下所示:

<Directory /var/www/web/>
    Options Indexes FollowSymLinks

    AllowOverride AuthConfig FileInfo Options
    AcceptPathInfo On
    AuthName "Protected Site"
    AuthType Basic
    AuthBasicProvider file
    AuthUserFile /etc/apache2/.htpasswd

    <RequireAny>
            Require user dev
            Require ip 71.198.111.188
    </RequireAny>

        #Order allow,deny
        #allow from all
</Directory>
Run Code Online (Sandbox Code Playgroud)

为什么在这种情况下使用 RequireAny 时会出现错误?

mod-auth apache-2.2

4
推荐指数
1
解决办法
1895
查看次数

SSH 到 bitbucket 返回权限被拒绝(公钥)

所以我试图将一个 repo 克隆到我的 Ubuntu 服务器上的目录,但我不断收到 Permission Denied (publickey) 错误。

这很奇怪,因为我的输出ssh -T git@bitbucket.org显示成功:

mo@li515-148:/var/www$ ssh -T git@bitbucket.org
conq: logged in as msamman.

You can use git or hg to connect to Bitbucket. Shell access is disabled.
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试克隆时,出现错误:

mo@li515-148:/var/www$ sudo git clone git@bitbucket.org:username/website-development.git
Cloning into 'website-development'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

这是详细的输出:

mo@li515-148:/var/www$ ssh -v git@bitbucket.org
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for …
Run Code Online (Sandbox Code Playgroud)

ssh putty git public-key ubuntu-12.04

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

apache-2.2 ×1

git ×1

mod-auth ×1

public-key ×1

putty ×1

ssh ×1

ubuntu-12.04 ×1