I would like to know, how can we completely migrate from NGiNX to AWS ELB including SSL(AWS certificate) ?
I have following NGiNX configuration for one of my domain(for example, example.com)
server { listen 80; server_name *.example.com; root /home/ubuntu/angularApp; index index.html index.htm; location / { try_files $uri $uri/ /index.html; } } server { listen 80; server_name example.com; root /home/ubuntu/website; index index.html index.htm; location / { try_files $uri $uri/ /index.html; } location ~ ^/api/(v1|v2)/ { proxy_pass http://backend_service$request_uri; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Google-Real-IP $remote_addr; } } I have mainly 2-query,
Query#1 :- How to configure a setting(in ELB) for Angular-App pages if requested URL contains/belongs subdomain otherwise refer other directory's index.html file instead of Angular-App.
Query#2 :- How to configure a setting(in ELB) to point API which is running on someother port on the same server(EC2) if incoming request's URI contain /api/v1/ or /api/v2/
NOTE - I have already approved AWS SSL Certificate which we can configure in ELB. so regarding SSL Certificate there won't be any issue. Currently I am using other than AWS's SSL certificate which is configured into NGiNX but have planned to use AWS ACM since all other things belongs to within AWS.
Any help would be really appreciable !!




