简体   繁体   中英

Can't connect to my apache server from another computer on the network

I installed Apache 2.4.7(Ubuntu) and have all config files set up. My domain name is www.cj1098.com. I can access it on my main computer through localhost and www.cj1098.com but when I try to access it from another computer on the network or an outside network I get an ERR_CONNECTION_REFUSED.

This makes me think that I'm not allowing the port through or my firewall is blocking it but I've disabled the firewall and allowed my ip through port 80.

I've also edited the default config file under apache2/sites-available to point to www.cj1098.com and given it the correct directory path name for my index.html.

Is there something I'm missing here? I've tried almost every tutorial I can find about 3 Google pages deep, ha.

I suppose I should mention my windows machine has an apache server that is visible outside of the network, but I couldn't get php to install (on windows) so I installed LaMP on Ubuntu. I have the windows apache server turned off and am trying to get the Ubuntu one working.

Edit: I can now see my index.html file from my windows machine(on the network) by typing in the ip address of my ubuntu machine. I can't access it on an outside network yet or by domain name on another computer yet.

Check if your firewall is enabled

sudo ufw status

If it is enabled, simply disable it and check again

sudo ufw disable

If that is the case, disable it again and write the exception rules for your firewall

sudo ufw enable

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM