apache虽然能运行,但是看见error.log中有httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.111 for ServerName这个错误,想看看是否有其他占用了80端口 开始--运行--cmd 进入命令提示符 输入netstat -ano 即可看到所有连接的PID 之后在任务管理器中找到这个PID所对应的程序如果任务管理器中没有PID这一项,可以在任务管理器中选"查看"-"选择列" 经常,我们在启动应用的时候发现系统需要的端口被别的程序占用,如何知道谁占有了我们需要的端口,很多人都比较头疼,下面就介绍一种非常简单的方法,希望对大家有用 假如我们需要确定谁占用了我们的80端口 1、Windows平台 在windows命令行窗口下执行: C:>netstat -aon|findstr "80" TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448 看到了吗,端口被进程号为2448的进程占用,继续执行下面命令: C:>tasklist|findstr "2448" thread.exe 2016 Console 0 16,064 K 很清楚吧,thread占用了你的端口,Kill it 如果第二步查不到,那就开任务管理器,看哪个进程是2448,然后杀之即可。把 80 改掉即可 补充:原来出现这个错误原因(httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.111 for ServerName)是因为DNS没配置好. 如果不想配置DNS, 就在httpd.conf , 在最前加入 ServerName localhost:80 即可。
80端口被占用有以下两种方法。
方法一:
1、使用电脑快捷组合建Win+R打开快速运行,在运行窗口中输入“cmd”命令点击回车确定调出管理员命令提示符,如下图所示:
2、调出提示符后,接着输入"netstat -ano"。注意"netstat"和"-ano"之间有空格,然后点击回车确定,如下图所示:
3、点击回车后,显示出一大段文字,找到 "本地地址" 为 0.0.0.0:80 的一行,在行的最后我们会看到 PID为"4"。记住次PID;如下图所示:
方法二:
1、打开任务管理器,接着选中详细信息,如下图所示:
2、接着在详细信息一栏,我们可以看到第二列就是PID,向下拖动,找到PID为"4"的程序。会发现是 system 程序占用了80端口。单击右键是无法结束的;如下图所示:
★注:出现占用无法结束的情况下,我们需要使用注册表编辑器将其关闭。
3、在电脑桌面使用快捷组合键Win+R打开快速运行,在窗口中输入“regedit”命令后点击回车确定调出注册表编辑器,如下图所示:
4、调出注册表编辑器后,依次展开至。
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/HTTP,如下图所示:
5、接着在选中HTTP,选中之后,我们就会看到右边有一个Strart文件,然后双击,将其数据值修改为“0”,如下图所示:
拓展资料
80端口是为HTTP(HyperText Transport Protocol)即超文本传输协议开放的,此为上网冲浪使用次数最多的协议,主要用于WWW(World Wide Web)即万维网传输信息的协议。
Secondary school students in schools should not use mobile phones 。
The current secondary school students into the campus with cell phones has become rampant, and this move seriously affected the normal order of schools and the physical and mental health of students, secondary school students in the campus should not use the phone. 。
First, students in schools using mobile phones distract the attention of learning. As middle school students still in the adolescent stage, the lack of social experience, control and ability to resist the temptation of the poor in the use of new mobile phones this new product will be a certain extent Enable students to forget one's own. For example, on the phone with most of the students into the campus almost all classes in the use of mobile phones play games, there are messages from time to time in the ring to interrupt the normal teaching teachers, such actions not only affected the order in the classroom And held up their own learning. 。
Second, students in schools using mobile phones will cause competition between the psychology students. Although the phone is not expensive, but serious students of the Victory psychological, must buy the phone better than others to meet the hearts of vanity. According to sociologists The survey, all favorable conditions families of students at an average annual要换four mobile phones, and more and more new models, the prices of more expensive, extravagant consumption during the phone with the amount of the turnover rate and rapid rise. Huijinrutu these students, Lost money the normal values, long past, Shemi comparisons of the wind all the more difficult to control. 。
Finally, secondary school students in the campus to use mobile phones for their own health adversely. It is well known cell phone radiation is a strong high-tech products, and in the campus if students carry a mobile phone, this is undoubtedly to the health of students buried hint. Some experts have said , Because young people are in their ears and skull adolescent adults more than the smaller, thinner, so middle school students to carry cell phones when the brain's absorption of radiation higher than 50 percent of adults in the school as long carry and use mobile phones According to secondary school students is bound to the brain caused by nerve damage, caused headaches, memory dissipated. 。
Whether from the attention of students, competition is also psychological and health and allow the use of cell phones on campus is a benefit without harm. In short, students in schools should not use mobile phones。
此外,项目属性还使您可以控制安全设置,生成配置和调试配置。若要手动设置和检查项目属性,请在 Visual Studio 集成开发环境 (IDE) 中打开一个项目。在“项目”菜单上单击“属性”。“属性”窗口有多个选项卡,并且每个窗格均列出了用于定义和控制项目行为的属性。自动化模型允许您以编程方式控制这些设置。具体来说,通过 CSharpProjectConfigurationProperties3、JSharpProjectConfigurationProperties3 和ProjectConfigurationProperties3 中列出的属性,可以控制当前活动配置的“属性”页的“生成”(对 Visual Basic 项目为“编译”)和“调试属性”窗格中的项目属性。也可以通过访问 ConfigurationManager 对象选择另一个(当前不活动的)配置。有关更多信息,请参见如何:创建解决方案和项目生成配置。 Visual C# 和 Visual J# 项目的配置属性分别在 CSharpProjectConfigurationProperties3 和JSharpProjectConfigurationProperties3 中定义。对于 Visual C#、Visual J# 和 Visual Basic 项目,其配置属性在 ProjectConfigurationProperties3 中定义。CodePage、DisableLangXtns、JCPA 和SecureScoping 属性只特定于 Visual J# 项目。ErrorReport 和LanguageVersion 属性只特定于 Visual C# 项目。CSharpProjectConfigurationProperties3 和JSharpProjectConfigurationProperties3 中的其他属性与 ProjectConfigurationProperties3 中的属性相同。不能通过将 Property 对象直接强制转换为 CSharpProjectConfigurationProperties3、JSharpProjectConfigurationProperties3 或ProjectConfigurationProperties3 对象来访问这些配置属性。但可以通过将配置项的名称作为字符串进行传递来访问这些属性,如下所示: C# �0�2�0�2�0�2�0�2EnvDTE.Project proj; �0�2�0�2�0�2�0�2EnvDTE.Configuration config; �0�2�0�2�0�2�0�2EnvDTE.Properties configProps; �0�2�0�2�0�2�0�2EnvDTE.Property prop; �0�2�0�2�0�2�0�2proj = DTE.Solution.Projects.Item(1); �0�2�0�2�0�2�0�2config = proj.ConfigurationManager.ActiveConfiguration; �0�2�0�2�0�2�0�2configProps = config.Properties; �0�2�0�2�0�2�0�2prop = configProps.Item("EnableSQLServerDebugging")这段代码访问 CSharpProjectConfigurationProperties3.EnableSQLServerDebugging、JSharpProjectConfigurationProperties3.EnableSQLServerDebugging 或ProjectConfigurationProperties3.EnableSQLServerDebugging 属性,具体取决于 proj 变量定义的是 Visual C#、Visual J# 还是 Visual Basic 项目。实际上,在 CSharpProjectConfigurationProperties3、JSharpProjectConfigurationProperties3 或ProjectConfigurationProperties3 中定义的配置属性是特定项目的可用配置属性的引用列表,这些特定项目可以作为项目配置属性项通过 Properties 集合访问。下面的步骤详细描述如何以编程方式访问 Visual Studio 外接程序中的当前活动配置的配置属性。注意您看到的对话框和菜单命令可能会与“帮助”中的描述不同,具体取决于您的当前设置或版本。这些过程是使用现用的常规开发设置开发的。若要更改设置,请在“工具”菜单上选择“导入和导出设置”。有关更多信息,请参见 Visual Studio 设置。访问特定类型项目的配置属性使用Visual C# 创建 Visual Studio 外接程序项目。在“项目”菜单上单击“添加引用”,再单击“.NET”选项卡,然后选择“System.Windows.Forms”、“VSLangProj”、“VSLangProj2”和“VSLangProj80”,并单击“确定”。将以下 using 语句添加到 Connect.cs 文件顶部。 C# using VSLangProj; using VSLangProj2; using VSLangProj80; using System.Windows.Forms;将以下函数调用添加到 OnConnection 函数。 C# _applicationObject = (DTE2)application; _addInInstance = (AddIn)addInInst; VSProjectConfigProperties(_applicationObject);添加VSProjectConfigProperties 方法,并使其紧跟在 OnConnection 方法的下方。 C# public void VSProjectConfigProperties(DTE2 dte) { try { // Open a Visual C#, Visual J#, or Visual Basic project // before running this add-in. Project project; Configuration config; Properties configProps; Property prop; project = _applicationObject.Solution.Projects.Item(1); config = project.ConfigurationManager.ActiveConfiguration; configProps = config.Properties; prop = configProps.Item("PlatformTarget"); MessageBox.Show("The platform target for this project is: " + prop.Value.ToString()); prop = configProps.Item("WarningLevel"); MessageBox.Show ("The warning level for this project is set to: " + prop.Value.ToString()); MessageBox.Show("Changing the warning level to 3..."); prop.Value = "3"; MessageBox.Show ("The warning level for this project is now set to: " + prop.Value.ToString()); if (project.Kind == PrjKind.prjKindCSharpProject) { MessageBox.Show("The project is a Visual C# Project"); prop = configProps.Item("LanguageVersion"); MessageBox.Show("The language version value is : " + prop.Value.ToString()); MessageBox.Show("Setting the language version to ISO-1"); prop.Value = "ISO-1"; MessageBox.Show("The language version value is now: " + prop.Value.ToString()); } if (project.Kind == PrjKind2.prjKindVJSharpProject) { MessageBox.Show("The project is a Visual J# Project"); prop = configProps.Item("CodePage"); MessageBox.Show("The code page value is : " + prop.Value.ToString()); MessageBox.Show ("Setting the code page value to my code page"); prop.Value = "my code page"; MessageBox.Show("The code page value is now: " + prop.Value.ToString()); } } catch(Exception ex) { MessageBox.Show(ex.Message); } }VSProjectConfigProperties 方法获取并显示 PlatformTarget 属性值。该方法可设置或获取 WarningLevel 属性。如果该项目为 Visual C# 项目,则 VSProjectConfigProperties 方法设置或获取 LanguageVersion 属性。如果该项目为 Visual J# 项目,则此方法设置或获取 CodePage 属性。通过单击“生成”菜单上的“生成解决方案”生成外接程序。在Visual Studio IDE 中打开一个 Visual C#、Visual J# 或 Visual Basic 项目。在“工具”菜单上单击“外接程序管理器”,再从“外接程序管理器”对话框中选择您要的外接程序。单击“确定”以运行外接程序。通过单击“项目”菜单上的“属性”,然后选择“属性”窗口中的“生成”选项卡,确认警告等级已被更改。 “警告等级”字段反映出您以编程方式进行的更改。若要验证 Visual C# 项目的语言版本设置,请在“属性”窗口中的“生成”窗格上单击“高级”。 “高级生成设置”对话框的“语言版本”字段反映出外接程序所做的更改。若要验证对 Visual J# 项目的代码页设置进行的更改,请在“属性”窗口中的“生成”窗格上单击“高级”。 “高级生成设置”对话框的“代码页”字段反映出该属性的更改。 示例下面的示例是一个简单的 Visual Studio 外接程序,演示如何通过使用 Visual Studio 中的自动化功能访问特定类型的项目的属性。 C# using System; using Extensibility; using EnvDTE; using EnvDTE80; using System.Windows.Forms; using VSLangProj; using VSLangProj2; using VSLangProj80; public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) { _applicationObject = (DTE2)application; _addInInstance = (AddIn)addInInst; VSProjectConfigProperties(_applicationObject); } public void VSProjectConfigProperties(DTE2 dte) { try { // Open a Visual C#, Visual J#, or Visual Basic project // before running this add-in. Project project; Configuration config; Properties configProps; Property prop; project = _applicationObject.Solution.Projects.Item(1); config = project.ConfigurationManager.ActiveConfiguration; configProps = config.Properties; prop = configProps.Item("PlatformTarget"); MessageBox.Show("The platform target for this project is: " + prop.Value.ToString()); prop = configProps.Item("WarningLevel"); MessageBox.Show ("The warning level for this project is set to: " + prop.Value.ToString()); MessageBox.Show("Changing the warning level to 3..."); prop.Value = "3"; MessageBox.Show ("The warning level for this project is now set to: " + prop.Value.ToString()); if (project.Kind == PrjKind.prjKindCSharpProject) { MessageBox.Show("The project is a Visual C# Project"); prop = configProps.Item("LanguageVersion"); MessageBox.Show("The language version value is : " + prop.Value.ToString()); MessageBox.Show("Setting the language version to ISO-1"); prop.Value = "ISO-1"; MessageBox.Show("The language version value is now: " + prop.Value.ToString()); } if (project.Kind == PrjKind2.prjKindVJSharpProject) { MessageBox.Show("The project is a Visual J# Project"); prop = configProps.Item("CodePage"); MessageBox.Show("The code page value is : " + prop.Value.ToString()); MessageBox.Show ("Setting the code page value to my code page"); prop.Value = "my code page"; MessageBox.Show("The code page value is now: " + prop.Value.ToString()); } } catch(Exception ex) { MessageBox.Show(ex.Message); } } Visual Basic Imports System Imports Microsoft.VisualStudio.CommandBars Imports Extensibility Imports EnvDTE Imports EnvDTE80 Imports VSLangProj Imports VSLangProj2 Imports VSLangProj80 Public Sub OnConnection(ByVal application As Object, _ ByVal connectMode As ext_ConnectMode, ByVal addInInst As Object, _ ByRef custom As Array) Implements IDTExtensibility2.OnConnection _applicationObject = CType(application, DTE2) _addInInstance = CType(addInInst, AddIn) VSProjectConfigProperties(_applicationObject) End Sub Sub VSProjectConfigProperties(ByVal dte As DTE2) ' Open a Visual C#, Visual J#, or Visual Basic project ' before running this add-in. Try Dim project As Project Dim config As Configuration Dim configProps As Properties Dim prop As [Property] project = _applicationObject.Solution.Projects.Item(1) config = project.ConfigurationManager.ActiveConfiguration configProps = config.Properties prop = configProps.Item("PlatformTarget") MsgBox("The platform target for this project is: " _ & prop.Value.ToString()) prop = configProps.Item("WarningLevel") MsgBox("The warning level for this project is set to: " _ & prop.Value.ToString()) MsgBox("Changing the warning level to 3...") prop.Value = "3" MsgBox("The warning level for this project is now set to: " _ & prop.Value.ToString()) If project.Kind = PrjKind.prjKindCSharpProject Then MsgBox("The project is a Visual C# Project") prop = configProps.Item("LanguageVersion") MsgBox("The language version value is : " _ & prop.Value.ToString()) MsgBox("Setting the language version to ISO-1") prop.Value = "ISO-1" MsgBox("The language version value is now: " _ & prop.Value.ToString()) End If If project.Kind = PrjKind2.prjKindVJSharpProject Then MsgBox("The project is a Visual J# Project") prop = configProps.Item("CodePage") MsgBox("The code page value is : " _ & prop.Value.ToString()) MsgBox("Setting the code page value to my code page") prop.Value = "my code page" MsgBox("The code page value is now: " _ & prop.Value.ToString()) End If Catch ex As System.Exception MsgBox(ex.ToString) End Try End Sub编译代码若要编译这段代码,请创建一个新的 Visual Studio 外接程序项目,然后用本示例中的代码替换 OnConnection 方法的代码。有关如何运行外接程序的信息,请参见如何:使用外接程序管理器控制外接程序。请参见概念项目属性其他资源访问特定于项目类型的项目、项目项和配置属性。
一、如何查看80端口被占用:
1、开始--运行--cmd
2、进入命令提示符,输入netstat -ano。
3、即可看到所有连接的PID
4、之后启动任务管理器
5、如果任务管理器中没有PID这一项,可以在任务管理器中选"查看"-"选择列"。
6、勾选pid,确定即可显示
80端口是为HTTP(HyperText Transport Protocol)即超文本传输协议开放的,此为上网冲浪使用次数最多的协议,主要用于WWW(World Wide Web)即万维网传输信息的协议。可以通过HTTP地址(即常说的“网址”)加“:80”来访问网站,因为浏览网页服务默认的端口号都是80,因此只需输入网址即可,不用输入“:80”了。