Наверное важно уточнить, что nginx я запускаю в docker контейнере.
nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
keepalive_timeout 65;
proxy_read_timeout 200;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
gzip on;
gzip_min_length 1000;
gzip_proxied any;
gzip_types text/plain text/css text/xml
application/x-javascript application/xml
application/atom+xml text/javascript;
# Only retry if there was a communication error, not a timeout
# on the Tornado server (to avoid propagating "queries of death"
# to all frontends)
proxy_next_upstream error;
include /etc/nginx/conf.d/*.conf;
}
default.conf
server {
listen 443 ssl;
listen 80;
server_name mydomen.com;
ssl_certificate mydomen.com.crt;
ssl_certificate_key mydomen.com.key;
# Allow file uploads
client_max_body_size 50M;
location / {
try_files /static/$uri $uri @nodeproxy;
}
location /restapi {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_pass http://rest_api:8989;
}
location /pgadmin {
proxy_redirect off;
proxy_set_header X-Script-Name /pgadmin;
proxy_set_header Host $host;
proxy_pass http://pg_admin:5050;
}
location ~ ^/kibana4/.* {
rewrite ^/kibana4/(.*) /$1 break;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
proxy_pass http://kibana:5601;
}
location @nodeproxy {
proxy_redirect off;
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_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
proxy_pass http://web_ui:3000;
}
}
Итак, в общем настраиваю прокси через nginx, пытаюсь прикрутить ssl, но он не работает, при попытке перехода на https вижу это:
Так же при попытке перейти по https нет никаких логов, но по http они есть.
При этом по http всё работает так, как должно.
Домен к ip привязан, ssl сертификат и key верные.