version: '3'
services:
webserver:
image: nginx:alpine
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./logs.log:/var/log/nginx.log
command: [nginx-debug, '-g', 'daemon off;']
events {}
error_log /var/log/nginx.log debug;
http {
server {
listen 80;
location = /api/v1 {
proxy_pass https://m.habr.com/kek/v2/articles/?sort=rating&fl=ru&hl=ru&page=2;
}
location = /api/v2 {
proxy_pass https://dog.ceo/api/breeds/image/random;
}
}
}
curl -v http://192.168.1.64/api/v1
curl -v http://192.168.1.64/api/v2
2020/11/27 03:46:28 [error] 30#30: *3 SSL_do_handshake() failed (SSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:SSL alert number 40) while SSL handshaking to upstream, client: 192.168.1.44, server: , request: "GET /api/v2 HTTP/1.1", upstream: "https://104.26.4.148:443/api/breeds/image/random", host: "192.168.1.64"
location = /api/v2 {
proxy_ssl_server_name on;
proxy_pass https://dog.ceo/api/breeds/image/random;
}