介绍
我有一个开发服务器(目前运行 Ubuntu 14.04 LTS),我已经使用了一段时间来在不同端口上托管各种开发工具。因为端口很难记住,所以我决定将端口 80 用于我的所有服务,并根据主机名在内部进行端口转发。
而不是写 domain.com:5432,我可以简单地通过 sub.domain.com 访问它
例如,使用端口 7547 并在 sub.domain.com 上运行的应用程序 X 具有以下 nginx 配置:
upstream sub {
server 127.0.0.1:7547;
}
server {
listen 80;
server_name sub.domain.com www.sub.domain.com;
access_log /var/log/nginx/sub.log combined;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:7547;
proxy_set_header Authorization "";
}
}
Run Code Online (Sandbox Code Playgroud)
问题
鉴于我选择的当前配置结构,是否可以使用 letencrypt 并在 https 下运行不同的服务?
我正在为我的大学课程做家庭作业。任务是使用nc (netcat)在 HTTPS 上获取网页。
要通过 HTTP 获取页面,我可以简单地执行以下操作:
cat request.txt | nc -w 5 <someserver> 80
Run Code Online (Sandbox Code Playgroud)
在request.txt我有一个 HTTP 1.1 请求
GET / HTTP/1.1
Host: <someserver>
Run Code Online (Sandbox Code Playgroud)
现在......这工作得很好。然而,挑战是 - 获取使用 HTTPS 的网页?
我得到了这样的页面证书。这就是我目前陷入困境的地方
openssl s_client -connect <someserver>:443
Run Code Online (Sandbox Code Playgroud) 我将 nginx 配置为我的外部可见网络服务器,它通过 HTTP 与后端通信。
我想要实现的场景是:
我当前的配置(后端配置正确)是:
服务器 {
听80;
server_name 本地主机;
位置 ~ .* {
proxy_pass http://backend;
proxy_redirect http://backend https://$host;
proxy_set_header 主机 $host;
}
}
我的问题是对客户端的响应(第 4 步)是通过 HTTP 而不是 HTTPS 发送的。有任何想法吗?
我正在寻找一种简单的方法来了解服务器是否在网站上为其 HTTPS 证书使用服务器名称指示 SSL 扩展。使用浏览器或 Unix 命令行的方法都可以。
谢谢!
我需要在 Apache 上设置我的 VirtualHost 以在 http 和 https 上提供服务(使用标准端口)
如果我启用 SSL 引擎(如下所示) - 在端口 80 上出现错误。
原因是,站点的某些部分需要 SSL,但其他部分不需要。我怎样才能在网站上同时提供 http + https 服务?
这是我的虚拟主机文件....
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
ServerName mysite.co.uk
DocumentRoot /var/www/mysite/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/mysite/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, …Run Code Online (Sandbox Code Playgroud) 我有一个运行 Jenkins 的 Fedora 服务器,我通过 yum 安装它。一切正常,我可以使用http://ci.mydomain.com.
但是现在,我想使用它来访问它,https://ci.mydomain.com因此使用用户名和密码的登录是加密的。
我怎样才能做到这一点?
以下是我的/etc/sysconfig/jenkins文件。启动 Jenkins 有效,但我无法使用带有https://ci.mydomain.com或的网络浏览器访问 Jenkins http://ci.mydomain.com:443,...
## Path: Development/Jenkins
## Description: Configuration for the Jenkins continuous build server
## Type: string
## Default: "/var/lib/jenkins"
## ServiceRestart: jenkins
#
# Directory where Jenkins store its configuration and working
# files (checkouts, build reports, artifacts, ...).
#
JENKINS_HOME="/var/lib/jenkins"
## Type: string
## Default: ""
## ServiceRestart: jenkins
#
# Java executable to run Jenkins
# …Run Code Online (Sandbox Code Playgroud) 我有一个通过 HTTPS 运行的前端 Web 服务器 - 这是面向公众的 - 即端口是开放的。
我还有一个后端 API 服务器,我的网络服务器向它发出 API 请求 - 这是面向公众的并且需要身份验证 - 端口是开放的。
这 2 个服务器通过 HTTPS 运行。
在 API 服务器的背后,还有很多其他的服务器。API 服务器反向代理这些服务器。这些其他服务器的端口不对传入流量开放。他们只能通过 API 服务器进行交谈。
我的问题......“许多其他服务器”是否需要通过 HTTPS 运行,或者,鉴于它们无法从外部访问,它们是否可以安全地通过 HTTP 运行?
我认为这将是一个常见问题,但我找不到答案。谢谢。如果这是一个骗局,请指出我正确的答案。
网络上有许多问题,人们在设置用于内部网络的自签名证书时遇到困难。
只是链接一些:
让 Chrome 接受自签名的本地主机证书
Chrome 接受自签名的本地主机
证书使用在 Chrome 58 StartCom 证书中工作的 openssl 生成自签名证书
错误:ERR_CERT_AUTHORITY_INVALID
我已经经历了他们中的每一个人,但仍然无法摆脱(net::ERR_CERT_COMMON_NAME_INVALID).错误。
步骤如下:
服务器上的密钥和证书生成
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout file.key \
-new \
-out file.crt \
-subj /CN=Hostname \
-reqexts SAN \
-extensions SAN \
-config <(cat /etc/ssl/openssl.cnf \
<(printf '[SAN]\nsubjectAltName=DNS:192.168.0.1')) \
-sha256 \
-days 3650
Run Code Online (Sandbox Code Playgroud)设置服务器进程 (apache) 以使用新生成的证书和密钥文件进行安全连接
certutilsudo cp file.crt /etc/pki/ca-trust/source/anchors; sudo upate-ca-trust我还为 …
我可以通过自己的 CA 创建并以这种方式生成自签名 SSL 证书。但是如何让浏览器将证书显示为“扩展验证 SSL 证书”?
我可以自己创建一个并教我的浏览器将其显示为 EV 吗?
https ×10
ssl ×5
http ×3
nginx ×2
openssl ×2
apache-2.2 ×1
certificate ×1
jenkins ×1
jira ×1
lets-encrypt ×1
linux ×1
netcat ×1
sni ×1
tcp ×1
tls ×1
udp ×1
virtualhost ×1