Can't run gin gonic server on domain using aws ec2 - go

I have a domain on godaddy.com which I've given the DNS of my AWS EC2.
I can successfully run a flask application with the code
app.run(host="0.0.0.0", port=8000, debug=True,ssl_context=('fullchain.pem', 'privkey.pem'))
If I open the link https://typearncontrol.com:8000/latest in my browser I would get a result.
I'm trying to run a gin gonic application with the code
router.RunTLS(("0.0.0.0:8083"),"fullchain.pem","privkey.pem")
When I try to open the link https://typearncontrol.com:8083/2 which is a page of my gin app I get the error "This site can’t be reached"
Please help me resolve this.

Related

Getting server error when deploy a MERN app to Heroku

Fail to load resource: server 503(service unavailable)
First thing, I am not sure whether I had set up the port correctly. My React frontend is running on localhost:3000 while my Express backend is running on localhost:3001
This is my .env file.
enter image description here
This is my server.js.
enter image description here
On the frontend side, whenever doing a HTTP request, I use Axios, the endpoint url is "http://localhost:3001/app/Member", something like that. I already had a MongoDB Atlas connected with the app, it is working perfectly on localhost:3001, but I have problem trying to deploy it to Heroku. Some people said there is connection problem between MongoDB Atlas and Heroku, they suggest using the MongoDB sandbox in Heroku to solve this problem, but I already have the database with all the data that I want to used with the app, is there any way that I can import the data from my database to the MongoDB sandbox?
I tried to use "heroku local" to test whether is working, the app is running on localhost:5000, I can see my signup and login page, but I am not able to signup or login with a user email and password like I did perfectly on development mode localhost:3000.
I deployed it to heroku live, it gave me a server 503 error(service unavailable). I logged out the error.enter image description here

Azure AD B2C return url in azure web app plan

I have a aps.net core mvc app connected to Azure AD B2C (here is a example I use). When I run the up on my local laptop it runs fine
Return URL: https://localhost:44316/signin-oidc
But when I publish the app to azure web app plan it not works.
With the return URL https:// https://myapp.azurewebsites.net/signin-oidc I become an HTML 404 error when I try to login. With the url: https://myapp.azurewebsites.net/ it goes back to my application without any login.
I was getting the same error when my reply URL in application was http://localhost:port/signin-oidc . I have corrected the app.setting with the callback path to and published :-
"CallbackPath": "/signin-oidc",
And i removed the localhost URL from the reply URL and kept it like below:
Re started the web app and it worked for me.Try and let know how it worked for you.

RefererNotAllowedMapError when running locally

I am trying to run my project locally and connect with the google places API, but I am getting the following response:
Google Maps JavaScript API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: http://localhost:8888/
I understand that it is being required for me to provide a authorization for an URL on cloud plattform, but how am I suppose to do so when running locally?
I've just experienced the same issue. It requires a credit card to be attached.

Facebook login Error: Cant load URL

I have this facebook app and I have setup my client id and secret on the code. When I try to access the api I get this error. I have tried everything. The app domain is localhost and the website url is the path that the app is running. Anyone know how to solve the issue?
This is the request:
https://www.facebook.com/v2.8/dialog/oauth?client_id=266389393769834&state=xxxxx&response_type=code&sdk=php-sdk-5.0.0&redirect_uri=http%3A%2F%2F%5B%3A%3A1%5D%2Fdemo%2F%2Fuser_authentication&scope=email
In order to test a localhost FB login setup, you cannot use their "Production" setup, as this points to an existing website, or IP
localhost, 127.0.0.1 or any alias (for example: my.domain or de.mo) you set on your localhost server will not work when the FB settings is pointing at production environment.
You need to set up a test environment using FB "Create New App"

Unable to make it work with OAuth from AWS-EC2 but doable in localhost

I followed every instructions from this site Google Dev Console site
and my web app was working well in http://localhost. No issues.
Now I deployed the web app in the AWS-EC2 server. I also added the Javascript Origins to show my 'subdomain.domain.com'. Upon hitting the button 'Google Login' from webapp on subdomain.domain.com, the google-authentication is not working ; shows the below error, where XX.YY.ZZ.AA is my AWS EC2 instance IP;
Error: invalid_request
Permission denied to generate login hint for target domain.
Request Details
redirect_uri=storagerelay://http/XX.YY.ZZ.AA?id=auth736964
response_type=permission id_token scope=email profile openid
openid.realm=
client_id=625394219770-q0qilkfl05m2fortt25j2j63e2dn6c1r.apps.googleusercontent.com
ss_domain=http://XX.YY.ZZ.AA fetch_basic_profile=true gsiwebsdk=2
That’s all we know.
I am asking for help on how to resolve this. Is it a EC2 forward issue, because the google error is not showing my subdomain.domain.com instead EC2-ip address. or something else?

Resources