---
title: "apache 启动httpd.exe 报错 Could not reliably determine the server's fully qualified "
author: "xdwangiflytek"
date: "2013-08-04T11:52:11Z"
tags: ["Apache", "window", "配置管理"]
categories: ["企业架构"]
slug: "apache-httpd-exe-could-not-reliably-determine-the-server-s-fully-qualified"
draft: false
lastmod: "2013-08-04T11:52:11Z"
id: 1917589
url: "https://xdwangiflytek.iteye.com/blog/1917589"
---

前言：apache虽然能运行，但是看见error.log中有httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168. x. x for ServerName这个错误，想看看是否有其他占用了80端口

开始--运行--cmd 进入命令提示符 输入netstat -ano 即可看到所有连接的PID 之后在任务管理器中找到这个PID所对应的程序如果任务管理器中没有PID这一项,可以在任务管理器中选"查看"-"选择列"

经常，我们在启动应用的时候发现系统需要的端口被别的程序占用，如何知道谁占有了我们需要的端口，很多人都比较头疼，下面就介绍一种非常简单的方法，希望对大家有用

假如我们需要确定谁占用了我们的80端口

1、Windows平台  
在windows命令行窗口下执行：  
C:\\&gt;netstat -aon|findstr "80"  
TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448  
看到了吗，端口被进程号为2448的进程占用，继续执行下面命令：  
C:\\&gt;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 即可