digitalocean and google domain settings - url

I have a problem when I access to my url.
If I enter myurl.com on browser, it redirects to my digital ocean server and shows the contents correctly. However, the url on the browser is changed to ip address:port/index right away.
I'm not sure what to change to show up with correct url (myurl.com) on the browser so that the users cannot see my ip address directly.
Below are the pictures of current setting.
Thank you in advance.
DNS Records on digital ocean side
DNS setting on google domain

Related

GoDaddy Domain Name not keeping full URL path

I have a domain name from godaddy (example... newdomain.com) and I am trying to mask the public IP address of my Django web application in my server. The settings for my newdomain.com in GoDaddy is "Forward with Masking."
The issue I am having is that every time I click the links in the web app the URL will always stay as newdomain.com. So for example in the webapp, I click a login button (which redirects to newdomain.com/login) the URL will always display as newdomain.com but the contents of newdomain.com/login will be displayed in the browser.
Please let me know if you have any clues on how to fix this, thanks in advance!

Is it possible to have a URL only be accessible through a portal?

I've got a website that requires a login, this website shows a "portal" which makes it possible to go to deluge/plex/sonarr (webapps). these apps are connected to ports. so example.com:83031 = plex and example.com:83032 is sonarr (as an example).
Now if I go to example.com it prompts me a login and I if I then click on "plex", the portal goes to example.com:83031. this is correct. however, is there a way to disable a direct link to example.com:83031 (so is there a way to ONLY make it able to enter that site through portal?)
Long story short: I want example.com:83031 to ONLY be available through the portal, not if you enter it directly into the browser. is this possible?
[Editted the domains, got the point!]
In theory, a browser should send a "redirect" indicating from where you came. Hence, example.com:83031 could check if you came from example.com:80. This is however not reliable.
However, if you redirect to example.com:83031/loginOK?<GUID> then you have explicitly encoded the redirection information, in a way that no browser can strip.
BTW, don't invent non-existent domains. example.com exists for a reason.
Using reverse-proxy on Apache has fixed this issue.
Picture describing the outcome

Cannot test Grails application which has oauth autontication inside LAN

I have a Grails project which I want to test in a Local network, but the problem is that I use OAuth for signing in and have specified localhost as my redirect URL to Google app which works fine on a single machine, but when other PC's try to use my app google returns the token to their PC because they are the it returning to localhost. I tried to specify My IP address to google redirect URL but it doesn't allow because it's not a public IP address. So does anyone have any suggestion on what I should do?
you need to have a domain name specifying the redirect url if your app goes out of your local environment(in your case to google.com).so the solution is test all aspects of ur app besides the login in ur lan enviroment

Possible to test Google social login locally?

I want to test the Google Social login system on my local machine. However when I create a new OAuth button: 'Create New Client ID' it requires me to fill in the Authorized redirect URI which needs to be a valid address (ends with .com or .org).
Obviously when we develop locally we don't have the .com or .org at the end. I have a virtualhost setup... and my address to my local development is mywebsite.local
Is there a way to input the redirect URI to be mywebsite.local without receinv the error:
Invalid Redirect: http://mywebsite.local/login/auth must end with a
public top-level domain (such as .com or .org)
Further to pinoyyid's answer, here's what you'd want in your /etc/hosts file.
0.0.0.0 mywebsite.com
I put new rules after everything else that's already in there.
you can then access your development site at mywebsite.com and enter the correct redirect URL in the Google Developer's Console.
You can set "Authorized redirect URI" to local IP (like http://127.0.0.1/callback), it's working fine for me.
What really agonizing is that google don't allow user to config an external IP (let's say your server IP like 99.99.99.99) as "Authorized redirect URI", google want the "Authorized redirect URI" to end with a public top-level domain (such as .com or .org).
Just map your dev server IP address to dev.example.com in your /etc/hosts.
I made a simple tool for this exact purpose.
Just set your redirect URL to http://redirectmeto.com/http://mywebsite.local/login/auth
You can ngrok to tunnel your localhost into public site, as described here.
The key is to use an https URL on your local environment.
On OSX you can install local https certificate: https://github.com/FiloSottile/mkcert
Or use Laravel Valet.
So, your new localhost URL becomes: https://mywebsite.local
Then save this https callback on google. Works on my computer
In my experience you have to use localhost or url with public top level domain (I use .bar) and all redirect urls have to be https (in case you want to have verified google app - needed for sheets/drive api)
Steps will help for windows users:
Go to host file which should be C:\Windows\System32\drivers\etc
Create add entry in host file like
127.0.0.1 localhost.com
Save it. User localhost.com as a organization in google dev console.
Thanks.

Blackberry Push notification : Java.io.IOException:Network operation(Subscribe)failed. Make sure that Content Provider Url is accessible

I am working on blackberry Push Notification and facing a big issue while registering from the device. I'm getting the Exception:
Java.io.IOException:Network operation(Subscribe)failed. Make sure that Content Provider Url is accessible..
I go through this guide and set up all things according to it.
However I am unable to register. My tomcat server is running and I can access content provider URL from my computer and the same from device's browser.
PC URL is: https:/loaclhost:8443/sample-push-initiator
I changed local host to IP address of my Computer. and can access it over WiFi.
Please help me regarding this.
Your push initiator URL must be publicly accessible from the internet to be accessible from your device. Using localhost or any local IP address (e.g. 192.168.0.2) won't work.
You'll have to set up your router to forward traffic on port 8443 to your PC's local IP.
You should ensure that this URL is accessible from your blackberry normal web browser (not the hotspot browser) before trying with the sample push app.

Resources