I am new to moodle, I have configured moodle on a Linux server, where there was IP address in place of the domain name. After I have replaced a subdomain name with my IP address, but then I am getting a registered site to model error.
but when I tried to register the site, I got the following error.
The hub cannot access your site at http://dnl.mydomain.com - Unable to connect (cURL error 6). Make sure that the site is not blocking HTTP requests from AWS IP address ranges.. Your Moodle site and the hub need to be able to communicate with each another. If you are unable to register your site please email support#moodle.org
well, If I can register site then it will be fine. But if I don't want to register my site then How can I hide this error.
If its a local site, you can switch off the registration message by adding this to config.php
$CFG->site_is_public = false;
Related
I have wordpress with woocommerce for REST API, the wordpress is running on docker.
For http client i'm using Guzzle6 with Oauth libs in Laravel app to do the Request. The laravel app is run behind nginx
When i set the base_url to localhost:port i got 401 response
{
"code":"woocommerce_rest_authentication_error",
"message":"Invalid signature - provided signature does not match.
}
When i set the base_url to my public ip it success.
When i develop on my local machine it success using localhost as base_url Why this happend ?
I had a same issue with WooCommerce trying to send a simple GET request with postman on localhost. I fixed it by setting WP_HOME and WP_SITEURL to my local ip address, or go to Admin Panel > Settings > General and replace localhost with your ip-address for WordPress Address (URL) and Site Address (URL) as explained here:
https://wordpress.stackexchange.com/questions/180207/how-to-make-other-computer-in-local-network-see-my-theme
Hope this helps.
i am trying to connect my site from others computers on local network. I can access the site from my system IP address but issue is this when i entered the username and password it will redirect the page from 192.168.0.2/ppp/login to localhost/ppp/auth/login and shows thee error localhost refused to connect.
localhost usually points to 127.0.0.1 . So, if you are getting redirected to localhost/login/ppp then the issue with your site's code. Don't redirect to http://localhost/login/ppp. Just do a redirect to /login/ppp instead.
The reason connection is refused is because the other PC doesn't have XAMPP (or any other web server) running on it.
your only need to change the config.php file in controllers. write your IP instead of localhost. Your code will run properly on network.
There is a Rapla event planner running at my work. It is set to be accessible only from computers in our office, though (IP check?). I needed to have an access also from my home, but the administrator won't reconfigure Rapla. However, I have an sftp account at the server (which is the same as the one where Rapla is running - same IP addressess; this server is accessible from Internet at browser's port 80, since we have our homepage running there).
I figured out, that I can upload Glype proxy script to my acoount and run it like this from any IP address: www.mycompany-domain.com/myfolder/glype/index.php. It really works and redirects me to a lot of websites, while showing my company server's IP. However, when I try to connect to a 8051 port (Rapla's port) through Glype, I get the cURL error:
The requested resource could not be loaded. libcurl returned the
error: Failed to connect to /here goes the IP/: Permission denied
Later on, I found a script called Glypeahead, which, according to the author, should fix this issue. I wasn't able to find any info how to use it and being myself just an amateur programmer, I am stuck at this moment.
So, my question is the following: how can I connect, using Glype, to Rapla's port 8051? I am open to any non-Glype solution too :-).
i have created a new Facebook application and i used the following url as canvas url http://localhost/my_app/
my code works perfectly on localhost, but when i try to cal my application using the following url : apps.facebook.com/leenaaps its displays the following error:
Unable to connect
Firefox can't establish a connection to the server at localhost
what could be the problem exactly?
You most likely do not have a local webserver running. If you do, it might be possible that Facebook uses https:// but you did not configure/enable SSL.
localhost is resolved to ip 127.0.0.1 and this is the local loopback address whcih means it is not routable and cannot be accessed from the internet, So you cannot use it in your canvas url.
You have to use a valid and active domain name like domain.com. If you don't have a public web server you may use some DDNS service, google it some are free
Ok simple enough
<?PHP
echo $_SERVER[REMOTE_ADDR];
?>
Ok maybe not, I my IP is currently 72.184.212.85 however the code above which I am using on an IP blocking system for a script shows my IP as my home server IP of 127.0.0.1
So when I go to my script my IP is shown as 127.0.0.1 but when I go to other websites it is shown as 72.184.212.85
How can I get the first value to show on my test server?
$_SERVER['REMOTE_ADDR'] will always show the IP address from which the request came. If you access your own script on your own computer within your own network, your external IP address never comes into play. The request would have to leave your local network and then come back in for the external address to show up, but if it's all local, that'll never happen.
You'll have to make your server publicly accessible and then access it from the public address. I'm guessing you're currently using localhost to access your server?
run your server say port 8080 and then forward the port in your router so it's public to the internet. Then visit your webpage/phpscript from http://72.184.212.85:8080 instead of http://localhost:8080.
Here is a ridiculous solution that I wouldn't recommend:
Register your home IP with a domain name, then see where the request came from via URL:
$url = $_SERVER["SERVER_NAME"];
or
$url = $_SERVER["HTTP_HOST"];
and then do a dns lookup of that result, which should return the IP it's registered to, ie your external IP.
$ext_ip = gethostbyaddr($url);
The only reason this wouldn't work (so sorry if I'm wrong), is if SERVER_NAME uses the same method as "REMOTE_HOST", which is a reverse DNS lookup, which won't resolve, as your internal IP won't be registered to that domain name. An easy way to check is to do either:
phpinfo();
and see what the environmental variables are.