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

showkey's questions

Martin Hope
showkey
Asked: 2022-04-10 18:31:53 +0800 CST

无法打开 /usr/lib/ssl/openssl.cnf

  • 0

创建密钥和证书:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
Can't open /usr/lib/ssl/openssl.cnf for reading, No such file or directory
140713226073408:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:69:fopen('/usr/lib/ssl/openssl.cnf','r')
140713226073408:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:76:

重新安装它:

apt install openssl --reinstall

检查文件:

ls -al  /usr/lib/ssl/openssl.cnf
lrwxrwxrwx 1 root root 20 Mar 19 02:25 /usr/lib/ssl/openssl.cnf -> /etc/ssl/openssl.cnf
ls -al /etc/ssl/openssl.cnf
ls: cannot access '/etc/ssl/openssl.cnf': No such file or directory

那怎么解决这个问题呢?

ssl openssl
  • 2 个回答
  • 1855 Views
Martin Hope
showkey
Asked: 2018-09-07 19:43:47 +0800 CST

为什么apache需要使用用户名和密码对url进行授权?

  • -1

我在 apache 中建立了基本授权。在 .Only 中只有一行/var/www/html/remote.html。

<p>it is a test </p>

现在用 curl 验证用户名和密码。

curl -u xxxx:xxxx -v  http://111.111.111.111/remote.html
*   Trying 111.111.111.111...
* TCP_NODELAY set
* Connected to 111.111.111.111 (111.111.111.111) port 80 (#0)
* Server auth using Basic with user 'xxxx'
> GET /remote.html HTTP/1.1
> Host: 111.111.111.111
> Authorization: Basic dGVzdHBhc3M6MTIzNDU2Nzg=
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Fri, 07 Sep 2018 03:32:42 GMT
< Server: Apache/2.4.6 (CentOS)
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Headers: Authorization,DNT,User-Agent,Keep-Alive,Content-Type,accept,origin,X-Requested-With
< Last-Modified: Fri, 07 Sep 2018 03:22:41 GMT
< ETag: "b2-5753f8537e26c"
< Accept-Ranges: bytes
< Content-Length: 178
< Content-Type: text/html; charset=UTF-8
< 

<p>it is a test </p>
* Curl_http_done: called premature == 0
* Connection #0 to host 111.111.111.111 left intact

在浏览器中输入http://111.111.111.111/remote.html?username=xxxx&password=xxxx,弹出授权窗口。

在此处输入图像描述

url中包含正确的用户名和密码,通过curl验证,为什么不能直接显示remote.html?
为什么我的 urlhttp://111.111.111.111/remote.html?username=xxxx&password=xxxx不能向 apache 服务器提供授权信息?

apache-2.4
  • 3 个回答
  • 1851 Views
Martin Hope
showkey
Asked: 2017-02-28 00:01:50 +0800 CST

ssh_config 中的 ConnectTimeout 是什么意思?

  • 7

本地和远程操作系统都是 Debian8。
我想让 ssh 存活很长时间。
我的客户端(本地)端的配置文件/etc/ssh/ssh_config。

Host *
    ServerAliveInterval 60
    ServerAliveCountMax 10000

我的服务器(远程)端的配置文件/etc/ssh/sshd_config。

/etc/ssh/sshd_config
TCPKeepAlive yes
ClientAliveInterval 60
ClientAliveCountMax 10000

经测试,ssh连接可以长时间保持活动状态。, 中有一个参数/etc/ssh/ssh_config,ConnectTimeout是什么意思?
做ConnectTimeout 0或ConnectTimeout 1000采取不同的效果?

connection ssh
  • 2 个回答
  • 33942 Views
Martin Hope
showkey
Asked: 2016-09-04 06:32:33 +0800 CST

如何在 apache2 中为前向代理设置某种身份验证?

  • -1

我有一个 VPS 并已将其配置为将 apache2 作为转发代理运行:

<IfModule mod_proxy.c>
ProxyRequests On
<Proxy vps_ip:80>
Order deny,allow
Deny from all
Allow from all
</Proxy>
</IfModule>

这允许我使用我的 VPS 从我的家用机器上下载资源,使用 curl:

curl -x "vps_ip:80"  http://www.someresource.com -o /tmp/mydown

但是,我知道这被认为是一个开放代理,我想限制它仅用于我的家用机器。Apache 配置支持代理客户端(如我的家用机器)的静态 IP 白名单。但是,每次我连接到互联网时,我的 ISP 都会为我分配不同的动态 IP。

如何防止其他人在我的 VPS 上使用我的转发代理?

authentication proxy apache2 curl
  • 1 个回答
  • 26 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