Amazon Certificate Manager + Elastic Load Balancer + Nginx + HTTP to HTTPS
Amazon Certificate Manager Installation
Amazon Certificate Manager Setup with Elastic Load Balancer
Amazon Certificate Manager Setup with LEMP
Here is my Nginx Config:
Default server configuration
server
{
listen 80;
listen [::]:80;
# SSL configuration
# listen 443 ssl;
listen [::]:443 ssl;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name xxx.xxx.xxx.xxx;
location /
{
First attempt to serve request as file, then
as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location ~ \.php$
{
include snippets/fastcgi-php.conf;
With php7.0-cgi alone:
#fastcgi_pass 127.0.0.1:9000;
With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht
{
deny all;
}
}
For HTTP to HTTPS:
proxy_set_header X-Forwarded-Proto $scheme;
if ( $http_x_forwarded_proto != 'https' )
{
return 301 https://$host$request_uri;
}
To follow tutorial I would suggest this guy blog link:
https://www.uvd.co.uk/blog/using-aws-...
Thumbnail Source: https://www.quora.com/How-do-I-instal...