Amazon Certificate Manager With Elastic Load Balancer | Nginx HTTP to HTTPS Redirect



Amazon Certificate Manager With Elastic Load Balancer | Nginx HTTP to HTTPS Redirect

Amazon Certificate Manager With Elastic Load Balancer | Nginx HTTP to HTTPS Redirect

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-certificate-manager-nginx/

Thumbnail Source: https://www.quora.com/How-do-I-install-AWS-Amazon-SSL-certificates-on-GoDaddy-and-HostGator-hosted-sites

Comments are closed.