Score:1

AWS EC2 NGINX SSL Issue after activating the SSL

as flag

We have this weird issue on our AWS EC2 instance, when we activate the "AWS SSL Certificate" on that specific EC2 instance it will not work and instead, it will just show the default "NGINX" page though the SSL was installed successfully.

The previous SSL expired and was provided by a 3rd party so now the site is showing the SSL insecure warning.

NGINX config

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
#ssl on;
ssl_certificate /ssl/2021/star_APP-Name.pem;
ssl_certificate_key /ssl/private-key-APP-Name.pem;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;

server_name dev.nomi.com.au;

location / {

    try_files $uri $uri/ /index.php$is_args$args;

    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
    fastcgi_connect_timeout 60;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
client_max_body_size 100M;

#rewrite \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php;

}

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    #fastcgi_pass unix:/run/php/php7.3-fpm.sock;

    fastcgi_pass 127.0.0.1:9000;

    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
    fastcgi_connect_timeout 60;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;

fastcgi_param COUNTRY-CODE $geoip2_data_country_code;
add_header COUNTRY-CODE $geoip2_data_country_code;

client_max_body_size 100M;

}

location ~* .(?:manifest|appcache|xml|json)$ { expires -1; }

#pagespeed on; #pagespeed FileCachePath "/var/cache/ngx_pagespeed/"; #pagespeed RewriteLevel OptimizeForBandwidth;

#location ~ ".pagespeed.([a-z].)?[a-z]{2}.[^.]{10}.[^.]+" {

add_header "" "";

#}

#location ~ "^/pagespeed_static/" { }
#location ~ "^/ngx_pagespeed_beacon$" { }


location ~* \.(eot|ttf|woff|woff2)$ {
    #add_header 'Access-Control-Allow-Origin' '*';
        #add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';

    expires 30d;    
}

#location ~* \.(jpg|jpeg|png|gif|ico|svg|css|js)$ {
#   expires 30d;
#}

if (!-e $request_filename) {
        rewrite /wp-admin$ $scheme://$host$request_uri/ permanent;
        rewrite ^(/[^/]+)?(/wp-.*) $2 last;
        rewrite ^(/[^/]+)?(/.*\.php) $2 last;
    }

#include /etc/nginx/global/wordpress.conf;

}

Thank you!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.