简体   繁体   中英

Https redirection is not working elastic beanstalk nodejs

I know this question was asked many times but I couldn't find a matching case and I'm totally new to AWS so I may be missing something

I read this page from the official doc then used this file then uploading my application but nothing seems to be changed.

Unfortunately, I'm tied to the current classic load balancer so I can't create a new Application load balancer

nothing seems to be changed.

The files you showed are for Amazon Linux 1 (AL1). Since you haven't specified whether you use AL1 or Amazon Linux 2 (AL2), I assume that the later one is used. This could explain why the files have no effect on your environment.

The nginx configuration files in for AL2 are different and should be placed in different location . Thus instead of /etc/nginx/conf.d/proxy.conf you should be using:

.platform/nginx/nginx.conf

Please note that there are many differences between AL1 and AL2, thus the config file as well as other your files may need to be modified:

Also the files only redirect traffic on the EB instances. Seems to me also that you want to redirect traffic on a load balancer. Sadly CLB does not support redirects . For that you would have to use ALB. However, a workaround is presented in the following link:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM