i'm trying to deploy my simple apollo-server on an Ubuntu 18.04 instance from Amazon Web Services(AWS) EC2. It works fine, but i need/want the traffic to be over HTTPS instead. I was wondering which could be the best option. Im running the code with "forever"("forever start lib/index.js"), also using yarn (to start the project "yarn start"). I'm able to access the server with the ip address () and everything works fine. I would like to do it ASAP, already tried with apollo-server-lambda and others Nodejs hosting websites.
The easier way to do this on AWS is by using a EC2 load balancer. You just need to create an application load balancer and add your instance to the target group. Once you have the load balancer created, you can apply the SSL certificate easily on your load balancer. This approach doesn't require you to change your application code at all.
Please refer this docs.
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-application-load-balancer.html
If you don't want to use a load balancer, you need to apply the SSL certificate on the application level. Hope this helps.
Related
I cannot figure out how to set my next js project to run on HTTPS.
I am using Next 12.3 and deploying on AWS EC2. I have my SSL sertificates and all ports are open. What should I do to run it like that?
P.S.
All the answers that I've found are about running on HTTPS during the development.
Some people even claimed that it is not natively supported by Next. Is this true?
If you setup nginx, this becomes extremely easy.
You can handle the SSL part in nginx and run your NextJS server normally and you will have a server running on HTTPS.
See Configuring HTTPS servers for setting up Nginx.
I'm very new to Jupyter notebooks and recently setup a dev instance with a basic password for external access. While this works fine, I need to tie it into LDAP or PAM authentication on my RHEL server.
As I started reading about this, it appears JupyterHub is the way to go with but I'm running into some issues with that setup. I did some basic configuration and I can login fine via PAM, but it says "Spawn failed" after the login page.
Ideally I'd like to stick with just notebooks + LDAP auth if possible to make things simpler. If that is not possible, can anyone help me out with what type of configuration I need for hub to frontend notebooks and just forward to the existing setup I have?
Hub is currently running on :8000
Notebooks is currently running on :8888
I also have custom themes on Notebooks that I want to keep, even if I have to use Hub.
Any help would be greatly appreciated.
Instead of using Hub, I ended up just using Apache to front end the connection and then proxy to 127.0.0.1:8888 localhost.
This allowed me to utilize LDAP auth as well as the certificates that I'm already utilizing with Apache.
I'm trying to install the cache server for OpenCPU (I need to enable caching) on an Ubuntu 16.04 EC2 instance. A dependency of opencpu-cache is the latest version of nginx (I can't install the cache server without it).
After I had already installed OpenCPU and verified that it was working, I installed nginx and then opencpu-cache. After installation, however, I can no longer make HTTP or HTTPS requests to the server. Entering both the public IP address and public DNS from the AWS console into my web browser fails to yield a landing page for the server, whereas it was working fine before I installed nginx.
My security rules on AWS are set up correctly (i.e. they're allowing the right ports for HTTP and HTTPS), so what is the issue? All my packages on the server are also up-to-date. SSH sessions work just fine still. I just can't figure out what the issue is.
Nevermind, it turns out that sudo service opencpu-cache restart did the trick lol. Props to Jeroen above.
We are using custom load balancer to load balance udp traffic in our system. We were able to create a ASG group for the instances behind load balancer, but we are not able use blue/green codeDeploy to deploy the application. Is there a way we can customize codeDeploy to use the our custom load balancer to perform a blue/green deploy ?
Unfortunately, CodeDeploy blue/green deployments do not support custom load balancer at this moment. It only supports Classic elastic load balancer.
I have recently deployed a Beanstalk application on EC2.
This application is deployed using Docker.
I have discovered that every Beanstalk EC2 machine comes with a nginx that acts as a proxy(I don't really understand why, not documented anywhere).
Now the problem is that I do not know which nginx should have its configuration optimized (worker_processes, worker_connections, etc.)
Now, I know what I do not want and that is to configure nginx in two places.
I also tried using passenger as standalone but passenger as standalone looks like nginx.
How do you manage this situation in production ?
why is there a default nginx running on the AWS EC2 AMI in the first place ?
you really configure two nginx ?
is first nginx just a proxy(on the AWS EC2 machine) ?
should not touch anything regarding topmost nginx ?
isn't this first nginx also affected by concurrency and should be optimized ?