magento2 – How to correctly configure the varnish cache in Magento 2.3 with SSL?

I'm trying to configure the varnish cache in Magento 2.3 with SSL termination, but so far I have not had any luck.

Here is my configuration:

/etc/apache2/ports.conf

Listen to 8080


        Listen 443



        
        
        
        Listen 443

/etc/apache2/sites-available/000-default.conf


/etc/apache2/sites-available/magento2.conf


     
     
     
     ServerAdmin contact@website.com
DocumentRoot / var / www / html / magento2 /
Server name website.com
ServerAlias ​​www.website.com

     
        Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow, deny
allow everything
     

     ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combo



        
        
        
        Server name website.com
ServerAlias ​​www.website.com
DocumentRoot / var / www / html / magento2 /

ProxyPreserveHost in
ProxyPass / http://127.0.0.1:8080/
RequestHeader set X-Forwarded-Port "443"
RequestHeader sets X-Forwarded-Proto "https"

SSLEngine in
SSLCertificateFile /etc/ssl/certs/website.com.crt
SSLCertificateKeyFile /etc/ssl/private/website.com.key
SSLCertificateChainFile /etc/ssl/website.com.ca-bundle
        
                Options Indexes FollowSymLinks MultiViews
Order allow, deny
AllowOverride All
        

/etc/varnish/default.vcl

default of the backend {
.host = "52.56.108.15";
.port = "8080";
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
.probe = {
.url = "pub / health_check.php";
.timeout = 2s;
.interval = 5s;
window = 10;
threshold = 5;
}
}

/ etc / default / varnish

DAEMON_OPTS = "- a $ {VARNISH_LISTEN_ADDRESS}: $ {VARNISH_LISTEN_PORT} 
-f $ {VARNISH_VCL_CONF} 
-T $ {VARNISH_ADMIN_LISTEN_ADDRESS}: $ {VARNISH_ADMIN_LISTEN_PORT} 
-p thread_pool_min = $ {VARNISH_MIN_THREADS} 
-p thread_pool_max = $ {VARNISH_MAX_THREADS} 
-p http_resp_hdr_len = 65536 
-p http_resp_size = 98304 
-p workspace_backend = 98304 
-S $ {VARNISH_SECRET_FILE} 
-s $ {VARNISH_STORAGE} "

Magento Cache configuration:

Access list: 127.0.0.1
Backend Host: 52.56.108.15
Bottom port: 8080
Grace period: 300

Here is how my answer headers look at this point:

Cache control: max-age = 0, must-revalidate, no-cache, no-store
Connection: Keep-Alive
Content encoding: gzip
Content security policy: insecure update requests
Content type: text / html; set of characters = UTF-8
Date: Friday, March 22, 2019 18:00:29 GMT
Expires: Thu, March 22, 2018 18:00:29 GMT
Keep-Alive: timeout = 5, max = 100
Pragma: no-cache
Server: Apache / 2.4.29 (Ubuntu)
Set-Cookie: PHPSESSID = fh1hcnrcvs4u25lp1kqq7sv8br; expires = Friday, March 22, 2019 19:00:29 GMT; Maximum age = 3600; path = /; domain = website.com; HttpOnly
Set-Cookie: form_key = Hu9gu1oJeyjVzCjm; expires = Friday, March 22, 2019 19:00:29 GMT; Maximum age = 3600; path = /; domain = website.com
Strict transportation security: maximum age = 31536000
Transfer coding: fragmented
Vary: Accept-Encode
Content type options X: nosniff
X-Frame options: SAMEORIGIN
Compatible with X-UA: IE = edge
Protection X-XSS: 1; mode = block

Can anyone help with this problem? Thanks in advance!