Moodle unable to access using domainName - apache2

Installing MOODLE_33_STABLE origin/MOODLE_33_STABLE on Ubuntu 16.04.2
I am able to install it and , access it with my vm's ip,
but when i try to change
$CFG->wwwroot = 'http://ipaddress'
to
$CFG->wwwroot = 'http://somerandomname.com'
in config.php,
i am unable to access it using somerandomname.com in my lan.
i have also mapped the vm ip in hosts file of both apache2 and of the other systems in lan, still it shows HTTP ERROR 502, in chrome.
and Host not found when i check the chrome console.
if i am missing something guide me.
i want to access the moodle installed on my VM across my local connection with some domainname rather than the IP .
Thank you.

Sounds like you have to try classical debugging:
Try to access your moodle instance on the specific port, using eg. telnet
telnet somerandomname.com 80
Delete browser cache or open the URL in your incognito mode
Check the apache error log on Ubuntu: /var/log/apache2/error.log.
Check out further possibilities which are causing this 502 error:
https://www.lifewire.com/502-bad-gateway-error-explained-2622939

Related

How send request from react native to local server

I am using android emulator and when i send request to localhost it gives me error. I have tried the forwarding the port also ngrok but none of them worked for me. It always gives me error.
[Error:Network Error].
IN Emulator go to setting->click on Network and Internet ->then select Internet->select available network and then re-run your project and check it will work
Please try http://10.0.2.2:8080 instead of localhost:8080. If you are referring your localhost on your system from the Android emulator then you have to use http://10.0.2.2:8080/ Because Android emulator runs in a Virtual Machine therefore here 127.0.0.1 or localhost will be emulator's own loopback address.
Original Answer Source

Could Not Connect my react app via ip4 address

This is my first time making react project.
After I run my project with npm run start, I can connect to it via localhost:3000 and 127.0.0.1:3000 without any problem.
But when I try to connect it with my LAN address on the same computer it shows
Could Not Connect
Description: Could not connect to the requested server host.
It also shown an error on browser console.
Failed to load resource: the server responded with a status of 502 (internal error - server connection terminated)
This same project can be open via ip4 if I run it on my laptop. I can even open it from my mobile in the same wifi.
My computer is own by company so I think something might block it.
Please give me your suggestions on how to fix this problem. What could possibly cause this problem.
Any insight would be helpful.
Thank you.
Run HOST=0.0.0.0 npm run start
Check your IP. <your-ip>:3000 would work.
https://create-react-app.dev/docs/advanced-configuration/ for setting HOST environment variables.

hosting on webpack dev server accessing from parallels

I am working on an app that for testing is hosted on web pack dev server.
I am using the following settings in my web pack.config file
devServer: {
host: 'mysite.local.co.uk',
port: '14500'
}
I have the following set in my hosts file on Mac
0.0.0.0 mysite.local.co.uk
I can now access the site on my Mac using http://mysite.local.co.uk:14500
I am trying to use a similar config to access the site from a windows 7 parallels desktop I have created.
I have done the following:
Set parallels network to shared
Set the hosts file windows to
[My Mac IP] mysite.local.co.uk
When I attempt to access the site from parallels I get no response
I have pinged [My Mac IP] and get reply's as would be expected.
I have tried setting host to 0.0.0.0 and as suggested here Github Issue
I am at a loss for how to make this work any suggestions would be greatly accepted
On macOS Mojave, go to Settings -> Sharing to see your Mac's network name.
It should say something like "Computers on your local network can access your computer at: YourComputerName.local". You can also change this name to something easier to remember and type.
On my Mac, this allows me to access my dev server via Parallels, Windows 10 and Chrome over port 8080. Not sure if the port matters.

Cannot access Jenkins

I have installed Jenkins on my Ubuntu 12.04 desktop machine using this guide:
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
I also needed to follow this guide:
http://aslamnajeebdeen.com/blog/how-to-fix-apache-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127011-for-servername-error-on-ubuntu
From my other machine (mac laptop) I now try to access Jenkins through safari:
http://192.168.1.100/jenkins
where 192.168.1.100 is the ip address of my desktop machine but I get an Error 404. I have also tried:
http://jenkins
but nothing happens. What am I missing?
The Jenkins service is running on my desktop PC:
service jenkins status
...
Jenkins Continuous Integration Server is running with the pid 3713
And if I enter: localhost:8080 in a browser on my desktop pc I get the jenkins web interface.
PROBLEM SOLVED:
I have followed this guide:
http://www.zzorn.net/2009/11/setting-up-hudson-on-port-80-on-debian.html
and it now works.
I had the same problem but not using Apache, rather only Jenkins on Ubuntu
I solved it by replacing HTTP_HOST=127.0.0.1 with HTTP_HOST=0.0.0.0 on /etc/default/jenkins
Jenkins is set to listen on port 8080 by default,
so you should point your browser to:
http://localhost:8080/
(or, in your case: http://192.168.1.100:8080/ )
EDIT:
If still not able to connect, you may wish to check your firewall settings.

could not connect to local host

Recently i installed apache tomcat 6 on my PC.I started the server and try to open the tomcat manager using the url:
http://localhost:8081/manager/html
8081 is the connector port i used at the time of installation and no other services using this port.But its shows the error like
Oops! Google Chrome could not connect to localhost:8081
I used this with differnt browsers IE and crome but still getting the same error
Please provide me the solving to getrid of this.
Try the "Test your Install" section here.
first make sure the your server is running correctly by connect to http://localhost:8081/

Resources