Articles of https

如何设置Nginx在单个站点上使用ssl / non-ssl作为不同的URL,但如果用户在浏览器的地址栏中inputhttps,则始终使用ssl?

我现在的nginx.conf看起来像这样: server { listen 80; server_name www.example.com; root /var/www/; location / { } location /users { rewrite ^ https://$http_host$request_uri? permanent; } } server { listen 443 ssl; server_name www.example.com; root /var/www/; location /users { } location / { rewrite ^ http://$http_host$request_uri? permanent; } } 通过这种configuration,当用户在网站上浏览页面时,连接从/切换到ssl / non-ssl,对于urls以/users开始,对于所有其他urls,non-ssl为ssl。 因此,即使用户在浏览器的地址栏中明确键入了https://www.example.com/ ,结果页面也会redirect到http://www.example.com/ 。 有没有一种方法来实现上述设置实现的ssl / non-ssl之间的自动url重写,但仍然尊重明确的ssl请求,如果https://是用户在浏览器的地址栏中显式键入?

NGINX HTTPS反向代理 – 快速TTFB但并发性低

我有一个运行的应用程序:NGINX(SSL)=> VARNISH(CACHE)=> APACHE / PHP。 运行ab基准testing ,我能够通过EC2 t2.small实例在清漆层(通过HTTP)实现30k +请求/秒。 然而,当我通过NGINX(HTTPS)运行testing时,我只能够推送160个请求/秒(来自公共networking的TTFB的平均值为43ms)。 @ nginx.conf user nginx; worker_processes auto; worker_rlimit_nofile 65535; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 16024; multi_accept on; } 并在http级别: sendfile on; tcp_nopush on; keepalive_timeout 10; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; @ domain.conf server { listen 443 ssl; server_name xyz.com; ssl_certificate /home/st/ssl3/xyz.crt; ssl_certificate_key /home/xyz/ssl3/xyz.key; ssl_protocols TLSv1 […]

仅针对特定urlredirect到SSL

我想通过重新引导一些URL模式强制SSL www。 例如, 强制SSL wwwredirect: http://example.com/asia/fewf -> https://www.example/asia/fewfwe http://example.com/africa/foo/bar/1/ -> https://www.example/africa/foo/bar/1/ 不要做任何事: http://example.com/europe/1 -> http://example.com/europe/1 http://www.example.com/europe/1 -> http://www.example.com/europe/1 我试着添加这个: RedirectMatch 301 ^(/asia[^/]*/.*)$ https://www.example.com$1 但是,它会导致错误:“太重要的redirect”

uwsgi本地https支持?

我想用https运行我的uwsgi服务器。 是的,我知道在生产中这是一个错误的事情。 该文档清楚地说:configuration您的密钥,并使用–https选项: http : –https 问题是,没有这样的select,显然: $ uwsgi –ini uwsgi.ini –https 0.0.0.0:8443,~/my.crt,~/my.key [uWSGI] getting INI configuration from uwsgi.ini uwsgi: unrecognized option '–https' getopt_long() error $ uwsgi –version 2.0.11 我在这里错过了什么?

通过代理从远程网站下载SSL证书

我想要一个脚本来检查我的服务器的证书。 这里有很好的答案,如何得到openssl s_client或gnutls-cli ,这工作正常….但不是如果你是在代理背后! 卫生署! 我没有发现可以告诉这些工具使用代理。 几个星期前(十五年后)Openssl似乎已经添加了-proxy选项,但是我不能使用这个版本,因为它在我的环境中还不可用。 我也不能安装像proxytunnel (我真的很喜欢)一些奇特的非标准隧道软件。 那么有什么办法从Web服务器下载远程证书与任何标准的工具,如curl , wget , openssl等?

logging连接到Apache的客户端使用的TLS版本

最近有消息传出,英国的PCI标准将取缔TLS1.0。 不幸的是,这意味着我们将不得不在明年夏季在电子商务的Web服务器上停止使用TLS1.0。 我们想确切地知道我们的用户使用TLS1.0连接到网站的百分比,以确定这个影响和我们的反应需要。 是否有一个模块或Apache的东西,可以让我们这样做? 我可以只使用正常的日志logging的东西? 该网站有很多的stream量,所以在debugging级别loggingSSL的东西可能会很快填补我们的硬盘…

在Apache中禁用单个文件的https

很长一段时间,我没有在我的linux服务器上使用https,因为我没有find适合我需求的体面的CA. 现在,让我们encryption(一个提供免费证书的新的CA)已经推出了他们的公开testing版,所以我马上得到了他们的证书。 我现在将所有的请求redirect到https,一切工作正常,但由于我已经使用HTTP的年龄,我将需要一些时间来重写一些客户端软件取决于wbesite是http。 不幸的是,我现在无法部署更新,因为更新机制现在也被破坏:/ 所以我的问题是:有没有办法在apache2中禁用单个文件的https? 我更喜欢使用一个简单的.htaccess文件的解决scheme,但也有人赞赏。 这是通过letsencrypt添加到VirtualHost *:80 : RewriteEngine on RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,QSA,R=permanent]

在HTTP HOST头中包含端口号会导致服务不可用错误

我们有一个在HTTPS上运行的WebService。 如果我使用SOAPUI并请求: https ://testservice.mydomain.com/WcfService.svc,它工作正常。 但客户报告他们得到503服务不可用错误。 在他们的HTTP HOST头里,我看到 – > testservice.mydomain.com:443。 为了复制,我创build了一个testingC#客户端,并手动设置HOST头来包含请求中的443端口。 我得到相同的错误,没有任何东西logging在IIS网站日志。 同样在SOAPUI中,如果我点击URL: https ://testservice.mydomain.com:443/WcfService.svc(必须这样做,因为不能手动更改SOAPUI中的HOST头),则返回相同的Service Unavailable错误。 如果我通过浏览器访问服务,那么即使在URL中包含端口号之后,我也能够访问。我尝试访问在线可用的Web服务,并且可以正确访问它们,不pipe是否带有明确的端口号。 这是一个IISconfiguration问题? 我们使用IIS 7.5并使用HOST头来承载多个站点。 其实我对IIS的了解不多,只是猜测。

在<location>括号中的SSL mod_proxy问题

我有麻烦得到proxypass在Apache中工作。 我的configuration文件如下: <VirtualHost 1.2.3.4:443> ServerName example.com ServerAlias www.example.org ServerAdmin [email protected] DocumentRoot /home/admin/web/knyz.org/public_html ScriptAlias /cgi-bin/ /home/admin/web/knyz.org/cgi-bin/ Alias /vstats/ /home/admin/web/knyz.org/stats/ Alias /error/ /home/admin/web/knyz.org/document_errors/ #SuexecUserGroup admin admin CustomLog /var/log/apache2/domains/knyz.org.bytes bytes CustomLog /var/log/apache2/domains/knyz.org.log combined ErrorLog /var/log/apache2/domains/knyz.org.error.log <Directory /home/admin/web/knyz.org/public_html> AllowOverride All SSLRequireSSL Options +Includes -Indexes +ExecCGI </Directory> <Directory /home/admin/web/knyz.org/stats> AllowOverride All </Directory> SSLEngine on SSLVerifyClient none SSLCertificateFile /home/admin/conf/web/ssl.knyz.org.crt SSLCertificateKeyFile /home/admin/conf/web/ssl.knyz.org.key […]

在Apache和CentOS下使用虚拟主机configurationSSL

我有两个从CentOS实例提供的网站。 其中一个启用了SSL,另一个刚刚在80端口服务。 所以, http://siteone.com和https://siteone.com都可以正常工作,就像http://sitetwo.com 。 问题是https://sitetwo.com显示https://siteone.com 。 我有一个公共IP地址可用。 我认为这种情况是我不能从一个IP服务两个https站点,但是至less有一种方法可以将httpsredirect到https://sitetwo.com 80端口,而不是提供错误的站点? sudo apachectl -S AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message VirtualHost configuration: ▽ xxx.xxx.xxx.xxx:443 siteone.com (/etc/httpd/sites-enabled/ssl-siteone.conf:1) *:80 is a NameVirtualHost default server beta-siteone (/etc/httpd/sites-enabled/beta-siteone.conf:1) port 80 namevhost beta-ilegis (/etc/httpd/sites-enabled/beta-siteone.conf:1) […]