我的操作系统是 vista HB的 装不起IIs 然后装了netbox 结果提示80端口被占用 我找到了占用80的pid 结果是系统进程 应该怎么找回80端口!
高手帮下忙!
我的操作系统是 vista HB的 装不起IIs 然后装了netbox 结果提示80端口被占用 我找到了占用80的pid 结果是系统进程 应该怎么找回80端口!
高手帮下忙!
80端口是为HTTP(HyperText Transport Protocol)即超文本传输协议开放的,这是上网冲浪使用最多的协议,主要用于WWW(World Wide Web)即万维网传输信息的协议。80端口是网站站点的默认端口,如果不是人工设置的话,其他程序是不会去使用此端口的。有可能是你的其他一些关于web的程序设置了80端口,迅雷也会占用80端口。
PS小建议:要装web服务器还是最好用Linux或window 2003,不用IIS的话,Apache是很好的选择。
netbox多端口设置
我的现在就是这么用的!不过 我建议最好装iis
Dim httpd0 Dim httpd1 Dim httpd2 Dim httpd3 Dim httpd4 Dim httpd5 Dim httpd6 Dim httpd7 Dim httpd8 Dim httpd9
Shell.Service.icon = "\status\on.gif" Shell.Service.RunService "ASPWebserver", "小旋风AspWeb服务器2005", "小旋风AspWeb服务器2005 off" '---------------------- 服务事件开始 ---------------------
Sub OnServiceStart() Shell.Service.SetTimer 100
'----下面信息设置NETBOX的变量,----
Set httpd0 = CreateObject("netbox.HttpServer") Set httpd1 = CreateObject("netbox.HttpServer") Set httpd2 = CreateObject("netbox.HttpServer") Set httpd3 = CreateObject("netbox.HttpServer") Set httpd4 = CreateObject("netbox.HttpServer") Set httpd5 = CreateObject("netbox.HttpServer") Set httpd6 = CreateObject("netbox.HttpServer") Set httpd7 = CreateObject("netbox.HttpServer") Set httpd8 = CreateObject("netbox.HttpServer") Set httpd9 = CreateObject("netbox.HttpServer")
'------开始分配80端口------
If httpd0.Create("", 80) = 0 Then Set host0 = httpd0.Addhost("", "\wwwroot") host0.EnableWrite=false host0.EnableScript = true host0.AddDefault "default.asp" host0.AddDefault "default.htm" host0.AddDefault "default.html" host0.AddDefault "index.asp" host0.AddDefault "index.htm" host0.AddDefault "index.html"
httpd0.Start else Shell.MsgBox "服务器启动失败,80端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配81端口------
If httpd1.Create("", 81) = 0 Then Set host1 = httpd1.Addhost("", "\wwwroot1") host1.EnableWrite=false host1.EnableScript = true host1.AddDefault "default.asp" host1.AddDefault "default.htm" host1.AddDefault "default.html" host1.AddDefault "index.asp" host1.AddDefault "index.htm" host1.AddDefault "index.html"
else Shell.MsgBox "服务器启动失败,81端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配82端口------
If httpd2.Create("", 82) = 0 Then Set host2 = httpd2.Addhost("", "\wwwroot2") host2.EnableWrite=false host2.EnableScript = true host2.AddDefault "default.asp" host2.AddDefault "default.htm" host2.AddDefault "default.html" host2.AddDefault "index.asp" host2.AddDefault "index.htm" host2.AddDefault "index.html"
else Shell.MsgBox "服务器启动失败,82端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配83端口------
If httpd3.Create("", 83) = 0 Then Set host3 = httpd3.Addhost("", "\wwwroot3") host3.EnableWrite=false host3.EnableScript = true host3.AddDefault "default.asp" host3.AddDefault "default.htm" host3.AddDefault "default.html" host3.AddDefault "index.asp" host3.AddDefault "index.htm" host3.AddDefault "index.html"
else Shell.MsgBox "服务器启动失败,83端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配84端口------
If httpd4.Create("", 84) = 0 Then Set host4 = httpd4.Addhost("", "\wwwroot4") host4.EnableWrite=false host4.EnableScript = true host4.AddDefault "default.asp" host4.AddDefault "default.htm" host4.AddDefault "default.html" host4.AddDefault "index.asp" host4.AddDefault "index.htm" host4.AddDefault "index.html"
else Shell.MsgBox "服务器启动失败,84端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配85端口------
If httpd5.Create("", 85) = 0 Then Set host5 = httpd5.Addhost("", "\wwwroot5") host5.EnableWrite=false host5.EnableScript = true host5.AddDefault "default.asp" host5.AddDefault "default.htm" host5.AddDefault "default.html" host5.AddDefault "index.asp" host5.AddDefault "index.htm" host5.AddDefault "index.html"
else Shell.MsgBox "服务器启动失败,85端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配86端口------
If httpd6.Create("", 86) = 0 Then Set host6 = httpd6.Addhost("", "\wwwroot6") host6.EnableWrite=false host6.EnableScript = true host6.AddDefault "default.asp" host6.AddDefault "default.htm" host6.AddDefault "default.html" host6.AddDefault "index.asp" host6.AddDefault "index.htm" host6.AddDefault "index.html"
else Shell.MsgBox "服务器启动失败,86端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配87端口------
If httpd7.Create("", 87) = 0 Then Set host7 = httpd7.Addhost("", "\wwwroot7") host7.EnableWrite=false host7.EnableScript = true host7.AddDefault "default.asp" host7.AddDefault "default.htm" host7.AddDefault "default.html" host7.AddDefault "index.asp" host7.AddDefault "index.htm" host7.AddDefault "index.html"
else Shell.MsgBox "服务器启动失败,87端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配88端口------
If httpd8.Create("", 88) = 0 Then Set host8 = httpd8.Addhost("", "\wwwroot8") host8.EnableWrite=false host8.EnableScript = true host8.AddDefault "default.asp" host8.AddDefault "default.htm" host8.AddDefault "default.html" host8.AddDefault "index.asp" host8.AddDefault "index.htm" host8.AddDefault "index.html"
else Shell.MsgBox "服务器启动失败,88端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if
'------开始分配89端口------
If httpd9.Create("", 89) = 0 Then Set host9 = httpd9.Addhost("", "\wwwroot9") host9.EnableWrite=false host9.EnableScript = true host9.AddDefault "default.asp" host9.AddDefault "default.htm" host9.AddDefault "default.html" host9.AddDefault "index.asp" host9.AddDefault "index.htm" host9.AddDefault "index.html"
'------启动------
httpd0.Start httpd1.Start httpd2.Start httpd3.Start httpd4.Start httpd5.Start httpd6.Start httpd7.Start httpd8.Start httpd9.Start
else Shell.MsgBox "服务器启动失败,89端口可能被占用!请停止当前WEB服务器或用记事本打开main.box文件修改端口.","错误对话框" Shell.Quit 0 end if End Sub '---结束语句---
Sub OnServiceStop() httpd0.Close httpd1.Close httpd2.Close httpd3.Close httpd4.Close httpd5.Close httpd6.Close httpd7.Close httpd8.Close httpd9.Close End Sub '------------------------------------------
Sub OnServicePause() Shell.Service.Icon = "\status\off.gif" Shell.MsgBox "服务器暂停运行!必要时记得打开噢!","暂停运行" End Sub
'------------------------------------------
Sub OnServiceResume() OnServiceTimer httpd0.Start httpd1.Start httpd2.Start httpd3.Start httpd4.Start httpd5.Start httpd6.Start httpd7.Start httpd8.Start httpd9.Start End Sub
'----------程序运行时,在图标栏的图片-----------
Sub OnServiceTimer If Shell.Service.icon = "\status\on.gif" Then Shell.Service.icon = "\status\on1.gif" Else Shell.Service.icon = "\status\on.gif" End If End Sub
'------程序结束------