Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Http apache2/Ubuntu10.10中的8080端口没有响应_Http_Apache2_Port_Ubuntu 10.10 - Fatal编程技术网

Http apache2/Ubuntu10.10中的8080端口没有响应

Http apache2/Ubuntu10.10中的8080端口没有响应,http,apache2,port,ubuntu-10.10,Http,Apache2,Port,Ubuntu 10.10,我家里有一台运行Ubuntu 10.10的电脑。我正在尝试创建一个服务器并托管我自己的网站,我正在运行一个LAMP(Linux、Apache、MySql、PHP)服务器。但是我的IPS阻止了端口80上的传入流量。为了解决这个问题,我希望我的服务器除了从端口80接收HTTP请求外,还从端口8080接收HTTP请求。但在我尝试将端口8080添加到接受的端口文件后,我的浏览器无法访问它。它说“mywebsite.com上的服务器响应时间太长。”。有人知道它为什么超时而不返回网页吗,或者我如何解决这个问

我家里有一台运行Ubuntu 10.10的电脑。我正在尝试创建一个服务器并托管我自己的网站,我正在运行一个LAMP(Linux、Apache、MySql、PHP)服务器。但是我的IPS阻止了端口80上的传入流量。为了解决这个问题,我希望我的服务器除了从端口80接收HTTP请求外,还从端口8080接收HTTP请求。但在我尝试将端口8080添加到接受的端口文件后,我的浏览器无法访问它。它说“mywebsite.com上的服务器响应时间太长。”。有人知道它为什么超时而不返回网页吗,或者我如何解决这个问题?以下是我迄今为止所做的工作:

port.conf文件包含:

NameVirtualHost *:80
Listen 80
Listen 8080
# Include the virtual host configurations:
Include sites-enabled/
NameVirtualHost *:80
NameVirtualHost *:8080
<VirtualHost *:80 *:8080>
        ServerAdmin webmaster@localhost
apache2.conf文件包含:

NameVirtualHost *:80
Listen 80
Listen 8080
# Include the virtual host configurations:
Include sites-enabled/
NameVirtualHost *:80
NameVirtualHost *:8080
<VirtualHost *:80 *:8080>
        ServerAdmin webmaster@localhost
可用站点/默认文件包含:

NameVirtualHost *:80
Listen 80
Listen 8080
# Include the virtual host configurations:
Include sites-enabled/
NameVirtualHost *:80
NameVirtualHost *:8080
<VirtualHost *:80 *:8080>
        ServerAdmin webmaster@localhost

服务器管理员webmaster@localhost
最后,我重新启动了apache:

$:/etc/init.d/apache2重新启动

据我所知,所有这些都应该为HTTP请求添加8080端口。当我在web浏览器中键入“localhost”或“localhost:8080”时,它会返回我的网站。如果我输入“mysite.com”或“mysite.com:80”,该网站也可以运行。但当我搜索“mysite.com:8080”时,我的网站不起作用;相反,它超时了。“mysite.com:80”之所以有效,是因为我是从本地网络访问网站的,所以我不需要通过调制解调器,因为调制解调器会阻塞端口80。有人知道为什么这不起作用吗


修正:我很笨,忘了在Ubuntu防火墙的可接受端口列表中添加8080端口

你看过wireshark之类的请求了吗?localhost将通过环回设备,我猜当您请求mysite.com时,请求将通过真实的网络设备发出。检查请求是否正在从您的网络返回-端口8080可能在其他地方被阻止。

@Ixop。谢谢你的建议!事实上,对我来说,这是一件非常愚蠢的事情(一如既往)。我忘了让Ubuntu防火墙接受来自8080端口的请求,尽管我已经让它接受来自80端口的请求。