I'm working on a project that uses the Google Maps JavaScript API v3 to render directions on an integrated map.
The website it built with Jekyll and I run the server using the following command:
jekyll serve --host 192.168.2.7
The given IP address is the IP Address of the system running the server.
The reason I made it listen to that IP Address is because I want to test the application on my mobile devices, following this answer
In the API Console I whitelisted 192.168.*, so that any local connection can use the API.
However, when I go to that IP Address on my phone or computer, the API says the application is not authorized despite me having whitelisted it.
What am I doing wrong here and how can I solve it?
Jekyll serve
The --hostname flag doesn't exist. Use --host 192.168.2.7 or host: 192.168.2.7 in _config.yml. Target address will then be 192.168.2.7:4000 as 4000 is the default listening port for Jekyll webrick server.
Google API withelist
It's not necessary to white list domain, as with no domain white listed you have Any referer allowed
Google authorization
Verify that you've set your API key to something else than https://maps.googleapis.com/maps/api/js?key=API_KEY you are supposed to have something like this : https://maps.googleapis.com/maps/api/js?key=AIzaSytitittototoX7RhHn-drLRRYututu7eX2hVo
If you still have problems, you can give a repository url to have it fixed quicker.
Happy Jekyll !
192.168.2.7 is a private IP address and is not publicly accessible. To use that you will probably need to get a license.
Related
I have windows 10.
To get the IP address of some website I type ping somewebsite.com in cmd.
For example if I say ping google.com, cmd shows Pinging google.com [216.58.206.206] with 32 bytes of data: and some lines after that. If I type that IP provided (216.58.206.206), that gets me to Google.
But some websites aren't like this. For example for website codeforces.com I get 213.248.110.126, but this doesn't get me to the website, instead shows some error 404 Not Found .
Why it doesn't work and what is the best method to get IP addresses of websites in Windows 10?
Thanks.
Some websites cannot be accessed by IP only.
Think for example, a public (free or paid) web hosting, with shared IP. If you doesn't provide a domain name (FQDN), then the server doesn't know what page needs to be served.
Think also on some "public" services, like Azure DevOps. They provide you a FQDN over a microsoft domain, but probably each DevOps repository doesn't have their own IP. If you only provides the IP, then the service doesn't know what page are you requesting.
Also, if you enter to an HTTPS page, the certificate are securing the domain name, not IP address. If you try to enter with IP only, your navigator tells you the page are not secure (Try it with Google for example).
I'm trying to connect WordPress instance on google cloud with the custom domain but I'm having this error
This site can’t be reachedquotivy.com refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
What I found it wired is that the domain is working on Tor browser and not working on Chrome and Safari, and I tried to take an online screenshot from it and it's working & I ping the domain and seems working too! not so sure what to debug or do to fix this bug!
This is a sample URL: https://quotivy.com/rumi/when-the-world-pushes-you-to-your-knees/
How it looks like on my browsers:
Custome DNS on my google cloud
If you have moved the site recently then check in your database (either domain.com/phpmyadmin or SSH if Cloud SQL) for references to the old domain and update to the new domain. This includes moving from http to https
In GCP Compute Engine VM Instance settings, make sure to allow http and allow https traffic. You may want to assign a static IP in GCP Console > VPC Network > External IP addresses
Lastly you may need to update etc/apache2/sites-enabled/000-default.conf to make sure your servername matches your WordPress domain name
This site can’t provide a secure connection localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR
When running a service or site locally you can avoid this problem by doing the following:
In project properties enable SSL:
Make sure to put https link as a start URL or just make direct request to https version:
I have a front-end deployed on Netlify and a back-end is deployed on localhost which is exposed using ngrok.
Is it possible to link them so that when I click on the Netlify link, it would send request to my localhost server exposed from ngrok ?
Netify can proxy to a dynamic backend, that is an intended use case. The problem we'll have is using "localhost" - netlify needs a valid hostname to connect to. So, if your ngrok is exposed (not firewalled) at some public IP, you can put that into your redirects configuration:
/backend-stuff-in-this-path/* https://1.2.3.4/:splat 200!
will send all requests to the path /backend-stuff-in-this-path/ANYTHING to the server at 1.2.3.4/ANYTHING
This may not be incredibly useful since your machine will change IP addresses sometimes one presumes, but if you were using localhost anyway, you weren't planning to put it in production quite yet. Note that redirects are deploy-specific, so you do need to redeploy to change the location if your IP changes.
I want to use Charles Proxy to share a local development PC's web server where I am developing sites on so that I can access the PC over my LAN to test on various mobile devices.
Having setup the correct ip address of my PC in the http proxy settings on various tablets they can all connect to the PC and this works fine.
The issue is that I need to test a wordpress site and as anyone that uses wordpress knows, it generates full url links between each page it serves. As the site normally runs on my PC the urls it generates are all http://localhost/wordpress/pagename.
So the issue is that if I access the same site from a remote device via the proxy (addressing http://192.168.1.200/wordpress/) it instantly redirects me to http://localhost/wordpress/pagename url in the mobile device and this fails to load as the tablet can't determine "localhost" correctly.
There must be a way of using one of Charles' various options to resolve this but I can't for the life of me work out which. I've tried remote maps and DNS spoofing but no joy.
Note, I'm completely aware that you can with SQL commands change the urls throughout a wordpress database but I just wanted to see if this was possible without undertaking this step as it would be a lot more flexible if I don't have to do that each time I want to preview sites via my other local LAN devics.
You can use Charles proxy feature called Rewrite Tool. I assume your local network uses 192.168.168.X IPs.
Enable rewrite
Add new rule and name it as you wish
To Locations section add Protocol: http and Host: 192.168.168.X
To Rules section add Type: body, Where: response, Match: localhost, Replace: 192.168.168.X
It may require some more tinkering but i hope you get the idea