简体   繁体   English

无法从网络上的另一台计算机连接到我的apache服务器

[英]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.

相关问题 从本地网络上的另一台计算机访问 apache2 Web 服务器 - Access apache2 web server from another computer on local network Apache:如何从网络外的计算机访问我的网页? - Apache: how can I access my webpage from a computer outside my network? 无法连接到端口 8079 上的本地 Apache 服务器 - Can't connect to my local Apache server on port 8079 在Mac上使用apache作为网络中的人可以连接并获取信息的游戏服务器是否合理? - Is it reasonable to use apache on my mac to be the game-server which people in my network can connect to and get information? 从本地网络中的计算机远程访问安装在VM上的Apache服务器 - Access Apache server installed on a VM remotely from computer in local network 尝试从另一台计算机访问我的Apache服务器时出现403禁止错误 - Getting 403 Forbidden error when trying to access my Apache server from another computer 无法连接到局域网上的 Apache 服务器 - Can't Connect to Apache Server on LAN 无法连接到RHEL6上的Apache服务器 - Can't connect to Apache server on RHEL6 无法远程连接到Apache服务器 - Can't connect to Apache Server Remotely 我如何从本地网络上的其他计算机上查看我的Apache Rails服务器? - How can i see my apache rails server from other computers on my local network?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM