I installed Apache in Ubuntu Desktop for working with Moodle, I want the Moodle website in var/www/html to be accessible by the computers connected in the same Wifi network. But after some google searches and following some online answers, when I access http://192.168.1.14/moodle from another laptop connected to the same wifi I am getting:
Unable to connect. An error occurred during a connection to localhost.
I allowed Apache2 in ufw using:
sudo ufw app list
Status: active
To Action From
-- ------ ----
Apache ALLOW Anywhere
Apache Full ALLOW Anywhere
Apache (v6) ALLOW Anywhere (v6)
Apache Full (v6) ALLOW Anywhere (v6)
My ports.conf file at /etc/apache2/ports.conf:
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 8080
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ifconfig result from my desktop where I am using Apache:
enp2s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b4:2e:99:44:ba:c4 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 22208 bytes 4472901 (4.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 22208 bytes 4472901 (4.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx502b73ebe00e: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.14 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::34e8:344:9f8e:ed62 prefixlen 64 scopeid 0x20<link>
ether 50:2b:73:eb:e0:0e txqueuelen 1000 (Ethernet)
RX packets 2620624 bytes 3583900946 (3.5 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1265305 bytes 146961762 (146.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Edit: My laptop IP was 192.168.1.12
http://192.168.1.14/moodle
. Did you try the same withhttps
instead ofhttp
? From the error message you have shown, it seems very unlikely that this could be the problem, but it might be worth a try.