小编Way*_*ner的帖子

如何使用 nginx 使用自己的证书设置多个子域?

除非我读过的每一个答案都是完全错误的,否则 SNI 应该可以做我想做的事,但每个指南都告诉我做我正在做的事情。

然而 nginx 提供了错误的证书,所以我显然做错了什么。

? sudo nginx -V | grep SNI                                                                                                                                                                                                                                                            %1
nginx version: nginx/1.10.3
built with OpenSSL 1.1.0f  25 May 2017
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-qJwWoo/nginx-1.10.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/ngi
nx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fa
stcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_reques
t_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --wit
h-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module --add-dynamic-module=/build/nginx-qJwWoo/nginx-1.10.3/debian/modules/nginx-auth-pam --add-dynamic-module=/build/nginx-qJwWoo/nginx-1.10.3/debian/modules/nginx-dav- …
Run Code Online (Sandbox Code Playgroud)

ssl nginx sni

10
推荐指数
1
解决办法
2025
查看次数

为什么我的 docker 实际上没有记录任何内容?

我有以下 python 文件:

 import time
 from datetime import datetime


 while True:
     time.sleep(1)
     print(datetime.now())
Run Code Online (Sandbox Code Playgroud)

我已将其添加到 Dockerfile 中:

FROM python:3.7


WORKDIR /test
COPY test.py /test/
CMD ["python", "test.py"]
Run Code Online (Sandbox Code Playgroud)

如果我构建这个并运行

sudo docker run -it --name test myimage
Run Code Online (Sandbox Code Playgroud)

一切都很棒。大约每秒打印一次当前时间。

另一方面,如果我运行它:

sudo docker run -d --name test myimage
Run Code Online (Sandbox Code Playgroud)

它会跑到后台,但如果我这样做......

sudo docker logs test
Run Code Online (Sandbox Code Playgroud)

我什么也得不到!不是什么该死的事情。

任何线索为什么会发生这种情况,或者我怎样才能弄清楚?当我使用时-d和不运行时docker inspect它都会给我"Type": "json-file", "Config": {}

我在 Ubuntu 18.04 上运行 Docker 18.06.1-ce,构建 e68fc7a。

logging docker

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

在 Centos7 上生成 /etc/audit/audit.rules 的正确方法是什么?

/etc/audit/audit.rulesCentos7的顶部它告诉我:

## This file is automatically generated from /etc/audit/rules.d
Run Code Online (Sandbox Code Playgroud)

好的,所以我去寻找,并找到了/etc/audit/rules.d/audit.rules。它有以下行

# Feel free to add below this line. See auditctl man page
Run Code Online (Sandbox Code Playgroud)

我做了,发现看起来可能是这个选项:

 -R file
        Read rules from a file. The rules must be 1 per line and in the order that they are to be executed in. The rule file must  be
        owned  by  root  and not readable by other users or it will be rejected. The rule file may have comments embedded …
Run Code Online (Sandbox Code Playgroud)

configuration auditd

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

usermod -g 不立即应用权限?

我注意到,当我将自己添加到一个新组时,usermod newgroup -g wayne我会在我说的时候列出该组groups,但是如果我要执行诸如

sudo mkidr /usr/local/grouptest
sudo chown root:newgroup /usr/local/grouptest
cd /usr/local/grouptest
touch test.txt
touch: cannot touch `test.txt': Permission denied
Run Code Online (Sandbox Code Playgroud)

我得到许可被拒绝。当我通过 ssh 会话连接时,我必须重新连接,然后该目录的权限才生效。有没有办法解决这个问题?特别是因为使用 GNU screen,我将不得不杀死并重新创建我所有的窗口,这将非常讨厌。

任何帮助将不胜感激!

permissions groups

2
推荐指数
1
解决办法
3211
查看次数

如何使用 Namecheap 为 letencrypt 正确设置 TXT 记录?

我正在尝试使用手册应用程序向Letsencrypt注册我的域,但我遇到了这个问题:

urn:acme:error:connection
Run Code Online (Sandbox Code Playgroud)

这是我运行它的方式:

? manuale authorize home.waynewerner.com waynewerner.com
Requesting challenge for home.waynewerner.com.
Requesting challenge for waynewerner.com.
DNS verification required. Make sure these TXT records are in place:
  _acme-challenge.waynewerner.com.  IN TXT  "<Some key>"
  _acme-challenge.home.waynewerner.com.  IN TXT  "<some other key>"
Run Code Online (Sandbox Code Playgroud)

所以我登录了我的 namecheap 仪表板,并在我的主机记录中添加了两个新的 TXT 记录。在主机领域,我尝试了两种方式,使用@home和使用_acme-challenge.waynewerner.com_acme-challenge.home.waynewerner.com。然后包含<Some key><some other key>(不带引号)的值字段。

然而我仍然得到:

home.waynewerner.com: waiting for verification. Checking in 5 seconds.
home.waynewerner.com: DNS problem: NXDOMAIN looking up TXT for _acme-challenge.home.waynewerner.com …
Run Code Online (Sandbox Code Playgroud)

domain-name-system lets-encrypt

2
推荐指数
1
解决办法
9629
查看次数