[新手请教]apache2局域网访问

37 views
Skip to first unread message

adream

unread,
May 16, 2012, 9:32:14 AM5/16/12
to shlug
当前局域网内有两台电脑,一台安装ubuntu12.04,并在其上安装apache2。
我现在的问题是,在ubuntu这台电脑上,我在浏览器里输入 192.168.0.104可以访问index.html这个网,但是在另一台电脑的浏览器内输入 192.168.0.104则无法apache2。
谢谢

狗尾草

unread,
May 16, 2012, 9:58:22 AM5/16/12
to sh...@googlegroups.com
查下防火墙是否允许其它主机访问80端口。
印象中默认配置,无此限制。
--
Best regards,
Hunk Guo
--



2012/5/16 adream <adre...@gmail.com>

adream

unread,
May 16, 2012, 10:03:11 AM5/16/12
to sh...@googlegroups.com
能说的详细点吗?
我的ports.conf是默认的:

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

谢谢

katero wang

unread,
May 16, 2012, 10:05:02 AM5/16/12
to sh...@googlegroups.com

首先确认80端口是通的 比如 telnet ip 80

adream

unread,
May 16, 2012, 10:26:15 AM5/16/12
to sh...@googlegroups.com
我在另一台机器上 telnet ubuntu 的 80端口:
telnet 192.168.1.104 80。
结果显示在端口80处链接失败。

adream

unread,
May 16, 2012, 11:20:35 AM5/16/12
to sh...@googlegroups.com
我的问题解决了,ubuntu电脑不使用DHCP分配IP,自己手动分配IP即可。
谢谢

Fan Zhang

unread,
May 16, 2012, 12:53:09 PM5/16/12
to sh...@googlegroups.com
看起来不像是ip问题。为什么virtualhost监听80但是却配443的口?
Fan


2012/5/16 adream <adre...@gmail.com>:
> 我的问题解决了,ubuntu电脑不使用DHCP分配IP,自己手动分配IP即可。
> 谢谢
>
>

Yiling Cao

unread,
May 17, 2012, 1:33:23 AM5/17/12
to sh...@googlegroups.com
Fan 你看错了, 443 在有ssl module enable是才会listen

你可以试下在root 下打 ufw allow 80。


2012/5/17 Fan Zhang <afans...@gmail.com>
Reply all
Reply to author
Forward
0 new messages