ssl of one virtual host messing with other virtual host nginx


The situation is
On my nginx server I have one virtual host (lets call it inbox) and another (lets call it postal) and to set up postal i followed a set of instructions. Postal has SSL enabled as you can see (see the virtual hosts site-avaibale configs file below in the “extra info” section).

  • http://inbox.go-tribalscale.com/index.html takes me to the correct inbox folder (/var/www/roundcube.go-tribalscale.com/public_html)

the problem is
– if i remove “/index.html” from the url it then takes me to postals directory (which loads the app therein , /opt/postal/public)

solutions
i think that the problem is in the ssl situation maybe the 443 port takes full control and the url is ignored not sure maybe you guys can help please?
extra info
inbox

server {
    listen 80;
    listen (::):80;
    root /var/www/roundcube.go-tribalscale.com/public_html;
    index  index.php index.html index.htm;
    server_name  roundcube.go-tribalscale.com www.roundcube.go-tribalscale.com;

    client_max_body_size 100M;

     location / {
            try_files $uri $uri/ /index.php?q=$uri&$args;
        }

    location ~ .php$ {
         include snippets/fastcgi-php.conf;
         fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         include fastcgi_params;
    }

     location ^~ /data {
         deny all;
      }
}

postal

  server {
    listen (::):80;
    listen 0.0.0.0:80;
    server_name postal.outreach-hangar49.com;
    return 301 https://$host$request_uri;
 }

server {
    listen (::):443 ssl;
    listen 0.0.0.0:443 ssl;

    root /opt/postal/public;
    server_name postal.outreach-hangar49.com;

    ssl_certificate      /etc/letsencrypt/live/postal.outreach-hangar49.com/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/postal.outreach-hangar49.com/privkey.pem;
    ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
    ssl_prefer_server_ciphers on;
    ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA512:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:ECDH+AESGCM:ECDH+AES256:DH+AESGCM:DH+AES256:RSA+AESGCM:!aNULL:!eNULL:!LOW:!RC4:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS;

    location / {
       client_max_body_size 50M;
       try_files $uri $uri/index.html $uri.html @puma;
    }

    location /app/assets {
       add_header Cache-Control max-age=3600;
    }

    location @puma {
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_pass http://127.0.0.1:5000;
    }
}