我有一个docker工人基础设施组成
1个nginx反向代理1个nginx web服务器1个php7.0 fpm服务器
nginx反向代理和web服务器都使用相同的docker镜像,但只是加载了不同的站点confs。
在反向代理服务器上,它也提供了一个静态的JavaScript SPA,以及反向代理服务器的web服务器。
所以两个nginx容器都运行相同的/etc/nginx/nginx.conf
我的SSLconfiguration在这里
## # SSL Settings ## ssl_stapling off; ssl_session_timeout 1h; ssl_session_tickets off; ssl_stapling_verify off; ssl_ecdh_curve secp384r1; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS; ssl_certificate /srv/ssl/nginx-selfsigned.crt; ssl_certificate_key /srv/ssl/nginx-selfsigned.key; ssl_dhparam /srv/ssl/dhparam.pem;
我的站点configuration为反向代理是这样的
server { listen 1025 ssl http2; listen [::]:1025 ssl http2; server_name api.site.com; location / { #include /etc/nginx/naxsi.rules; proxy_pass https://td-api:1025; proxy_buffering on; proxy_buffers 256 16k; proxy_buffer_size 128k; proxy_read_timeout 300; proxy_intercept_errors on; proxy_max_temp_file_size 0; proxy_busy_buffers_size 256k; proxy_temp_file_write_size 256k; proxy_set_header Host $host; proxy_set_header Accept-Encoding ""; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
我的网站configuration为温泉是
server { listen 1025 ssl http2; listen [::]:1025 ssl http2; server_name site.network; root /srv/agentfree-client/dist; limit_conn addr 10; limit_req zone=one burst=15 nodelay; index index.html; autoindex off; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.html break; } } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } }
我的nginxconfiguration为api web服务器是
server { listen 1025 ssl http2 default_server; listen [::]:1025 ssl http2 default_server; index index.php; root /srv/www/public; server_name api.site.com; limit_conn addr 10; limit_req zone=one burst=15 nodelay; location / { #include /etc/nginx/naxsi.rules; try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass td-api-fpm:9000; } }
我的SSL是自签名和生成如下
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /srv/ssl/nginx-selfsigned.key -out /srv/ssl/nginx-selfsigned.crt openssl dhparam -out /srv/ssl/dhparam.pem 2048
在此之前,我将在tls1.3 betaclosures的情况下以全模式运行cloudflare ssl
当我加载静态网站,我得到我的网站和一个漂亮的绿色https在铬
当我尝试在我的api中打一条路线时,出现这个错误
本网站无法提供安全连接
api.site.com使用不支持的协议。 ERR_SSL_VERSION_OR_CIPHER_MISMATCH隐藏详细信息不受支持的协议客户端和服务器不支持通用的SSL协议版本或密码套件。
Im在Ubuntu 16.10和docker集装箱运行16.10即时通讯在铬57.0.2987.110(官方build设)(64位)我也在同一台机器和iPad上testingFirefox。
如果我绕过api URL的cloudflare我的网站加载尽pipe与自签名ssl警告。
任何人都可以解释为什么发生这种情况,即时运行这个确切的设置多个应用程序没有问题,但这一个API服务器驱使我疯了
原来你不能在免费的计划中使用ssl的多级子域名