Windows 系统重装后 Apache 的恢复,安装 apache 服务到系统

系统重装后 Apache 的恢复 windows

Windows 非安装版 apche 程序下载地址:http://httpd.apache.org/download.cgi

安装 apache 服务到系统

默认情况下,apache 并没有在系统中存在服务。启动 apache/bin 目录下的 ApacheMonitor.exe 并不会显示 apache,需要手动安装

  1. windows + r, 输入 cmd, 打开 命令提示符输入窗口
  2. 切换到 apache 目录下的 bin 文件夹
  3. 执行 httpd.exe -k install 安装 apche 服务到本地
  4. 然后就可以直接用指令启动服务 net start apache2.4 ( 这里后面是apache 的版本号,根据自己需要调整,如:你的是2.2,它的名字就是 apache2.2

启动方式

安装服务之后有三种启动方式:

  1. 直接进入 apache/bin 双击运行 httpd.exe 启动服务,此时会弹出一个窗口,不要关闭这个窗口,关闭窗口就是关闭了 apache
  2. 进入命令提示行,执行命令 net start apache2.4来启动 apache 服务
  3. 在打开 apache/bin/ApacheMonitor.exe 程序后,在图形界面中启动服务器

httpd.exe 的一些操作

以下是 httpd.exe 的一些操作帮助信息

D:/Apache2/bin>httpd /?

Usage: httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-w] [-k start|restart|stop|shutdown]
[-k install|config|uninstall] [-n service_name]
[-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-n name : set service name and use its ServerConfigFile
-k start : tell Apache to start
-k restart : tell running Apache to do a graceful restart
-k stop|shutdown : tell running Apache to shutdown
-k install : install an Apache service
-k config : change startup Options of an Apache service
-k uninstall : uninstall an Apache service
-w : hold open the console window on error
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

十月ooOO

许个愿,我帮你实现

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值