AWS EBS: Can't set up https - node.js

I'm trying to set up https on Amazon Web Services Elastic Bean Stalk running Node.js app and I have strange problem.
I installed successfully the signed ssl certificate, configure EBS to use HTTPS (443) port, but after saving changes nothing particular happen. Port is still blocked and I can use only port 80 connections. (Receive errors about connection timed out when tried to connect over https or :443)
I've iterate step by step on Amazon Docs with no success...
Can you help me? Do you need more data?

Related

How to make NodeJS API ssl enabled?

I have one AWS EC2 machine and my client and API applications both deployed in the same machine. I have enabled SSL for client (react app) but when I enabled it this time I could not fetch data from API because it is not SSL enabled it serves from "HTTP" not "https" so I get et::ERR_SSL_PROTOCOL_ERROR error. I looked some ways to enable SSL from API, I can use nginx SSL but my client uses nginx SSL with port 443. How my API can serve from the same port?
I could not solve this issue before client SSL enabled, it worked with API but now I does not.
Could you help me?

Deploy nodejs express on AWS windows server

I deplyoed my nodejs application on a AWS server with windows server as OS. The application is a simple express server running on https port 443. The application is accessible through localhost, but I can access the app through public IP.
Here are a few things I tried:
IIS with urlrewrite like so (https://dev.to/massivebrains/deploying-node-express-app-on-a-windows-server-2l5c)
iisnode
I am still not able to access my app. I setup up inbound rules in my firewall for the port and nodejs itself.
The issue was simply in my security group. I had set up the IP addresses I was expecting, but one was missing. It is working now.

How can I start HTTPS Node JS Server with certificates in Pivotal Cloud Foundry?

Is it possible to deploy a node.js app on Cloud Foundry that listens for HTTPS requests on port 443?
Well, the good news is that you don't have to do that. The Cloud Foundry platform takes care of it for you.
All you need to do is push your app and assign a route to the app. Your platform operations team will already have everything set up so that traffic for both HTTP and HTTPS routes through to your application.
The only thing you probably want to do in your application is to look at the x-forwarded-proto (should be http or https) or x-forwarded-port (80 or 443) header. You can use this to determine if the client's connection was over HTTP or HTTPS, and if it's HTTP then issue a redirect to ask the client to connect over HTTPS (this force clients to use HTTPS).
You can read more about this in the docs at the following link:
https://docs.cloudfoundry.org/adminguide/securing-traffic.html
Having said all that, if you really want to control the certs for some reason you can do that. You would need to map a TCP route to your application. This will enable TCP traffic to flow directly to your application. Then you can configure your application as an HTTPS endpoint on the mapped TCP route and port.
Some notes about this:
You will almost certainly end up with some high numbered port, not 443. The platform will have a pool of available ports, which is configured by your operations team, and you are limited to using only those ports.
The platform and buildpacks will not help set up TLS, you will need to handle that all on your own. The good news is that it should work exactly the same as if your app were running on a VM or your local laptop.
You will need to create your own TLS certs and push them with the application. You can probably use Let's Encrypt, but you may need to obtain these through your employer, if you work for a large company.

How to set ssl certificate on aws ec2 instance?

I want to use https (port 443) for my web app which is developed using NodeJS express mongodb.In order to do that I know I need to get ssl certificate. My app is hosted by Amazon ec2. My express server listens port 3000.I created ssl certificate using Amazon Certificate manager ,and I also set up apache following some tutorial. However when I go to port 40 I see apaches page (I used to see my app here since I redirected port 80 to 3000 before). When I do https request it just gives me nothing.I set load balancer and attached to my ec2 instance.Is there a good tutorial or can you tell me what I am missing? This became so annoying.

Some networks time out when I trying to make AJAX calls to my server

I have an application with a React/Redux frontend deployed on AWS S3, and an Express/Mongo backend deployed on AWS EC2. The application works fine on MOST networks.
However, on a certain network, whenever the frontend tries to make any AJAX call to the backend, I get a timeout error:
"Failed to load resource: net::ERR_CONNECTION_TIMED_OUT".
So far, it's only this particular internet that is giving me the error, and it also happens to be a government site's network. I'm thinking there may be some setting I need to configure on my AWS EC2 server?
Ended up figuring it out. The network firewall was blocking the specific port (3090) of my server, but not the url of the server itself so I just forwarded port 80 to 3090 and now the network firewall doesn't block it.

Resources