403 Squid error after successful deployment on elastic beanstalk - node.js

I'm stuck with the launching of my node.js server and client (nuxt) environments. After successful deployment, both of them started normally (saw that in logs), but I can't access them using a browser because of a 403 squid error.
How could this issue be sold?

A VPN service was activated in a browser, and this is why squid blocked me.

Related

502 Bad Gateway nginx/1.10.3 (Ubuntu) - Angular app down

I have an website in Angular hosted on AWS. On my local machine, the app works with npm start. However, when I ssh and update the changes I get an 502 Bad Request Error. It looks like this might be a dependency issue. Do you know know to troubleshoot this?

Unable to fix NGINX 502: Bad Gateway error on a Digital Ocean droplet - Ubuntu 20.04

I have deployed my website to a Digital Ocean droplet (Ubuntu 20.04 server).
Everything was working fine. Today, I did some changes to the website in my local machine. So I pushed the changes to GitHub and then cloned the GitHub repo again to the server. Then, I installed the dependencies and restarted PM2.
Now, when I visit my site https://sundaray.io, I get the following error.
The following is the error log.
How can I fix the error?
Simple meaning is
No HTTP server response, your Node Http server is not answering requests.
502 gateway mean server and Nginx is getting your request but there is issue with upstream.
you can use the command to show the logs of pm2
pm2 show
the application might be crashing or internal server 500 error.

Phusion Passenger + Apache + Node.js app runs on http but not https. 404 Error

I have a Phusion Passenger Node.js application configured with cPanel that ran perfectly on my primary domain. I created a new application that uses the same path but switched the domain to another domain on my account. On the old domain: ghv.xie.mybluehost.me, the application worked on both http and https.
http://ghv.xie.mybluehost.me/portal
https://ghv.xie.mybluehost.me/portal
On the new domain: csmithcpa.com, the app only works on http. https returns a 404 error.
http://csmithcpa.com/portal
https://csmithcpa.com/portal
I am not sure how to debug this or why it would return a 404 at all on https but completely work on http. Any help would be fantastic.
EDIT: I will keep adding useful information for debugging as more people ask questions about it.
cPanel/WHM access
Apache server
Phusion Passenger application manager
Node.js web application
-portal
--app.js
--node_modules
-public_html
--ghv.xie.mybluehost.me site files
--csmithcpa
---csmithcpa.com site files

http to https url in AWS Beanstalk single instance environment

I deployed my NodeJS/Express app on AWS Beanstalk. The current config is :
Environment type: single instance
EC2 instance type: t2.micro
Node.js version: 10.15.0
No load balancer
Proxy server : Nginx
When deployed it gives me a URL http://<app-name>.<server-location>.elasticbeanstalk.com/
I tested (using Postman) my authenticate API with the URL - http://<app-name>.<server-location>.elasticbeanstalk.com/users/authenticate and it gives me the status code of 200 OK and is working fine.
When I use HTTPS instead of HTTP it doesn't work as expected. In postman I get below error:
There was an error connecting to https://<app-name>.<server-location>.elasticbeanstalk.com/users/authenticate
I have my frontend deployed on netlify and when I trigger the same request from my Web application it gives me below error :
The page at 'https://<app-name>.netlify.com/login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://<app-name>.<server-location>.elasticbeanstalk.com/users/authenticate'. This request has been blocked; the content must be served over HTTPS.
I understand that since my request is coming from https I need to have my backend configured to have https listener. I am not sure as to how I can accomplish this in AWS Beanstalk where I don't have a Load balancer and my env type is a single instance.
I am new to AWS. Appreciate your help. Thanks!
You'll need to add an .ebextension config file to:
Allow 443 traffic in your Security Group
Install the ssl package
copy the certificates from the application package to the ssl dir. (certificates can be created in the certificate manager) or paste them in the config file
edit nginx config
Here is an example
https://edwardsamuel.wordpress.com/2015/07/17/enable-https-and-http-redirect-on-aws-elastic-beanstalk/

Domains with SSL on dokku

I have a NodeJS app on ubuntu EC2 with dokku. My domain is pointing on server with wildcard and I have a SSL certificate with wildcard as well. Some time ago I added keys to dokku in app/tls/. Back then I had two apps online, production and staging. The last created on dokku (created, deployed) was intercepting all requests to host so api.my.domain and api-stage.my.domain and blah and whatever. If I typed http:// then there was no redirect. Deadline was close so I wasn't fighting with it anymore and I just made production to be the one who intercepts everything. Today I had problems with deployment, I've seen rejects over and over. I've deleted some plugins including not used anywhere dokku-domains, restarted docker few times run this command:
sudo wget -O /etc/init/docker.conf https://raw.github.com/dotcloud/docker/master/contrib/init/upstart/docker.conf
and there was no rejects anymore but... all requests to host returns 502 Bad Gateway. and there was no rejects anymore but... all requests to host returns 502 Bad Gateway including those with green padlock. I remember that previously when app was during deployment there was some info about configuring SSL, now there is none. After deleting an app and creating from scratch there is no nginx.conf file and SSL doesn't work at all.

Resources