How to redirect HTTP to HTTPS from Classic Load Balancer in AWS - amazon-elastic-beanstalk

We have a web application developed in Asp.NET MVC Core 3.1. Deployed it using Elastic Beanstalk.
Configured Classic load balancer for this with AWS issued certificate listener. Our classic load balancer's listeners configured as below.
Using this setting, its not redirecting from Http to Https. However if we try to access website individually with Https and Http its working fine.
We don't want to change Load Balancer Type from Classic to Application as the environment is already setup in Route S3 too.
Can you please help if anything missing in this?

Related

redirect sub subdomain to subdomain in cloudflare

I am trying to redirect app.test.dev.mydomain.io to another origin app.dev.mydomain.io because there is an IOS app which uses this origin, but I got the error of ERR_SSL_VERSION_OR_CIPHER_MISMATCH
and the app is running on kubernetes cluster with ingress controller to access it.
do you have any suggestions to doing that?

Express backend & React frontend under the same domain

I have a backend in Express.js deployed on Elastic Beanstalk and a frontend built with React.js deployed on Amplify and I would like to make HTTP (using axios) requests from the frontend to the backend via relative paths.
I'm quite new to AWS but I figured I could use Cloudfront to set the backend as a behaviour?
I have a domain (mydomain.com) for the frontend where the DNS are pointing to Amplify cloudfront (which I think I can't access...) and Elastic Beanstalk has its own aws domain (http://app-name.region.elasticbeanstalk.com/).
The frontend seems to be working fine as if I go to mydomain.com I can see it. Also the backend seems to be working as if I go to http://app-name.region.elasticbeanstalk.com/api/user it would return the expected json data.
The idea would be though that mydomain.com serves my React application which internally would make calls to, for example, mydomain.com/api/user where my express backend would serve the user.
I got lost in the docs and on the internet didn't really find anything.
Is using Cloudfront the right approach? If so, how do I connect Amplify and Elastic Beanstalk?
Any suggestion would be very appreciated!

In Google Cloud Platform, Is there a any service to be a replacement of Web server (Nginx Or Apache) and Load Balancer(Haproxy)

RightNow, I am manging URL's and its redirection using Nginx hosted on physical machine. URL Redirection is achieved and pointed to different load balancers(Haproxy) as mentioned in the vhost file of Nginx.
Is there any option available in GCP to provide the services of redirection without using Nginx and Apache? And also let me know what are the alternate options available in GCP for Haproxy
From what I understand you have a few services (and maybe some static content) serving via Haproxy (which is doing load balancing) to the Internet.
Based on that I assume that if someone wants to go to "yourservice.com/example1" would be redirected by load balancer to service1, and if someone types "yourservice.com/static1" them he will be served static content by different service etc.
GCP has exactly a service you're asking for which can do url/content based load balancing. You can also move your current services to the Google Compute Engine (as virtual machines) or Google Kubernetes Engine which will run your services as a containers.
Also - using GCE or GKE can do autoscaling if that's what you need.
Load balancing provided by the GCP can do all the content based balancing that Haproxy which you're using now.
If you're using some internal load balancing now, I believe it could also be done with one load balancer ( and could simplify your configuration (just some VM or containers running your services and one load balancer).
You can read more about load balancing concepts and specifically about setting up GCP to do that.

json rest api, locally hosted, lan accessible

For some time now I try to figure it out how to create a json rest api and a database, host it locally and make it accessible in lan. I need this for an android app, exactly to parse data from database to app.
I created the json rest and database usimg XAMP but i didn't figure it out how to make them accessible from lan.
After that somebody recomanded me IIS and since then I did'n figure it out.
Some sugestions?
For the web api application, host in the IIS server in some other system. In the mobile application development environment is in same LAN network, then call the api using that web api system ipaddress instead of the localhost.

Openshift DIY Dropwizard with HTTPS

I got my Dropwizard application running in an Openshift DIY Cartridge.
The application uses Https and binds to port 8080. I can access the application with curl from within an ssh connection via rhc ssh appname.
What do I have do configure that I can access my Dropwizard application via the appname-username.rhcloud.com domain?
I always get a proxy error 502. Error reading from remote server.
Any suggestion is greatly appreciated.
tmy
In OpenShift your application is deployed behind a proxy server ant this proxy server can only communicate with your application using http.
The OpenShift proxy server allows you to use both http and https connections and to communicate which type of connection was used the proxy server adds x-forwarded headers in the request to your application.
Tho configure Dropwizard, you will need to configure the http connector on port 8080, the default, and set useForwardedHeaders to true, also the default. See http://dropwizard.io/manual/configuration.html#http for more information.
At this point Dropwizard is aware whether a http or https connection was used. The thing I did not find is how to make content "confidential" so that the jetty container inside Dropwizard redirect the client to the https connector served by the OpenShift proxy server when the client tries to connect to your application using http.