小编Mit*_*tch的帖子

使用 OpenSSL s_client 通过 SSL 连接到 PostgreSQL

我正在尝试使用来自s_clientXP 上OpenSSL 的 SSL 连接到 AWS 上的 PostgreSQL 服务器。我可以使用这个连接到第三方s_client。在服务器和 XP 上,我都使用 openssl 版本 0.9.8.k。

当我尝试连接到我的服务器时,我得到了结果:

CONNECTED(00000003) 2036:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188 :

在 Postgres 日志中,我看到了以下条目:

2009-10-30 13:58:08 UTC LOG: invalid length of startup packet

我很感激任何关于在哪里寻找让这个工作的建议。也许有一个公共 AWS 映像我可以查看已知可以在哪个 PostgreSQL 上工作?

postgresql openssl

8
推荐指数
3
解决办法
8331
查看次数

Django 在浏览器中将 URL 重写为 IP 地址 - 为什么?

我正在使用 django、nginx 和 apache。当我使用 URL(例如http://www.foo.com/)访问我的站点时,我的浏览器地址中出现的是附加了 admin 的 IP 地址(例如http://123.45.67.890/admin/)。当我通过 IP 访问该站点时,它会按预期被 django 的 urls.py 重定向(例如,http://123.45.67.890/ -> http://123.45.67.890/accounts/login/?next=/

我希望名称 URL 的行为方式与 IP 相同。也就是说,如果 URL 转到新视图,则浏览器地址中的主机应保持不变,不会更改为 IP 地址。我应该去哪里解决这个问题?

我的文件:

; cpa.com (apache)
NameVirtualHost *:8080

<VirtualHost *:8080>

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/htm

DocumentRoot /path/to/root
ServerName www.foo.com

<IfModule mod_rpaf.c>
    RPAFenable On
    RPAFsethostname On
    RPAFproxy_ips 127.0.0.1
</IfModule>

<Directory /public/static>
    AllowOverride None
    AddHandler mod_python .py
    PythonHandler …
Run Code Online (Sandbox Code Playgroud)

url nginx django apache-2.2

5
推荐指数
1
解决办法
2160
查看次数

标签 统计

apache-2.2 ×1

django ×1

nginx ×1

openssl ×1

postgresql ×1

url ×1