Help setting up nginx proxy with a web container & nginx reversed proxy container

I also apologize. The main thread had duplicate nginx block code, which I just now saw.

I have solved it though… I think? Not sure if it is the best way. I use the server listen 80/443 block with the ssl information on the proxy, and use this for example in the web site nginx server file:

server {
listen 80;
server_name website;

    listen 443 ssl http2;
    listen [::]:443 ipv6only=on ssl http2;
    root /var/www/website;

    index index.php index.html index.htm;


    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param   HTTP_SCHEME         https;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

}

I have noticed however, if I seperate it the server block so it’ll separate 80 and 443 with eg:

server {
listen 80;
server_name website;
}

server {
listen 443 ssl http2;
listen [::]:443 ipv6only=on ssl http2;
root /var/www/website;

    index index.php index.html index.htm;


    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param   HTTP_SCHEME         https;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

}

I am getting a welcome to nginx. How come?