ISPC Nginx: proxy in local lan using wrong certificate

Discussion in 'ISPConfig 3 Priority Support' started by IzFazt, Nov 9, 2020.

  1. IzFazt

    IzFazt Member HowtoForge Supporter

    ISPconfig : latest, upgraded updated
    Certbot installed new certificate, valid till februari next year, working 100% on ISPC default index page

    As I have only one IP address I use various ISPC vhosts that proxy from another VM node in the same lan by the ISPconfig webhost. Most of the time this works flawless.

    The below Nginx vhost setup proxies the newest Magento 2.4 setup by Composer using Elasticsearch on port 9200. By the way that was about 16 hours of work, plowing through documentation. What a mess the installation of this great shop system has become! My Magento setup is now a 100% working instance on 192.168.178.116.

    This vhost generates (Cloudflare both in and out of development mode) an "Invalid SSL certificate" error. How do I force the vhost to use the ISPconfig generated cert and not the proxied cert?

    My ISPC rebuild of the Nginx VHOST as advised by Magento to proxy Apache on same node (port 8080 in doc) :
    Code:
    server {
      listen *:80;
      listen [::]:80;
      listen *:443 ssl;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      listen [::]:443 ssl;
      server_name 192.168.178.116;
      ssl_certificate /var/www/clients/client1/web3/ssl/domain.tld-le.crt;
      ssl_certificate_key /var/www/clients/client1/web3/ssl/domain.tld-le.key;
    
      location / {
       proxy_pass http://192.168.178.116:9200;
       proxy_redirect off;
       proxy_set_header Host $host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }
    
      location /_aliases {
       proxy_pass http://192.168.178.116:9200;
       proxy_redirect off;
       proxy_set_header Host $host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      }
    
    }
    
     

Share This Page