[英]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. 我安装了Apache 2.4.7(Ubuntu)并设置了所有配置文件。 My domain name is www.cj1098.com.
我的域名是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.
我可以通过localhost和www.cj1098.com在我的主计算机上访问它,但是当我尝试从网络或外部网络上的另一台计算机访问它时,我得到了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. 这使我认为我不允许该端口通过,或者我的防火墙阻止了该端口,但是我禁用了防火墙,并允许我的IP通过端口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. 我还编辑了apache2 / sites-available下的默认配置文件,以指向www.cj1098.com,并为其指定了index.html的正确目录路径名。
Is there something I'm missing here? 我在这里想念什么吗? I've tried almost every tutorial I can find about 3 Google pages deep, ha.
我尝试过几乎每本教程都可以找到大约3个Google页面,哈。
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. 我想我应该提一下,我的Windows计算机上有一个可以在网络外部看到的apache服务器,但是我无法在Windows上安装php,所以我在Ubuntu上安装了LaMP。 I have the windows apache server turned off and am trying to get the Ubuntu one working.
我关闭了Windows apache服务器,正在尝试使Ubuntu一号正常工作。
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. 编辑:现在,我可以通过输入ubuntu机器的ip地址,从Windows机器(在网络上)看到我的index.html文件。 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 sudo ufw启用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.