Windows安装Apache注册服务出现(OS 5)拒绝访问。 : AH00369: Failed to open the Windows service manager,

在Windows安装Apache的时候,我下载的是zip格式,不是msi安装版,需要自己注册服务,才能在桌面任务栏里有httpd的图标。

结果在cmd命令行里输入安装服务命令的时候出错,出错信息界面如下:

(OS 5)拒绝访问。  : AH00369: Failed to open the Windows service manager, perhaps you forgot to log in as Adminstrator?

(OS 5)拒绝访问。  : AH00369: Failed to open the Windows service manager, perhaps you forgot to log in as Adminstrator?

错误信息提示我没有用管理员身份登录!

解决方案如下:

打开cmd程序的时候以管理员身份运行就行了。

然后就安装成功了,

出现提示:

Installing the Apache2.4 service
The Apache2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
AH00558: httpd: Could not reliably determine the server's fully qualified domain
 name, using fe80::f83f:2c24:a0d8:cb5. Set the 'ServerName' directive globally t
o suppress this message

界面如下:

(OS 5)拒绝访问。  : AH00369: Failed to open the Windows

OK,问题搞定!

(OS 5)拒绝访问。  : AH00369: Failed to open the Windows

这时候你可以在浏览器中输入http://localhost来测试时候成功,如果不成功,说明本地80端口被占用,你可以到 httpd.conf中将所有80的端口改成8080,再次输入,如果出现如图提示,表示安装成功。

(OS 5)拒绝访问。  : AH00369: Failed to open the Windows

另外的两个方法

Win7 安装apache2.2服务错误

步骤一:

Installing the apache2.2 service

<OS 5>拒绝访问.  :Failed to open the WinNT service manager

目前的 Apache 2.2  安裝檔,不能在 Windows7上完成安裝,有下面方法可用:

方法一:  如果有安裝好或已經解開的執行檔,重新註冊 httpd.exe 為 service 即可,用 “httpd.exe -k install”.

我是用以上的方法。
 

步骤二:

软件安装时与windows7的“用户账户控制”(UAC)冲突,只要先关 闭UAC(控制面板--用户账户和家庭里面有“更改用户账户控制设置”,改成从不通知,完成后重启)

再安装就没问题了,安装完后可以再修改回来。

综合上述收集的资料,结合自己的操作系统(win7旗舰版)情况,解决方案如下:

 1.更改操作权限,如下图所示:(见附件)

 2.按照如下文章提供的方法,重新安装了Apache服务:

  Win下apache出现问题:“No services installed” || apache服务启动

 3.注意,安装好了之后,把上述权限改回去。

猜你喜欢

转载自www.linuxidc.com/Linux/2017-01/139451.htm
今日推荐