apache服务器组件,Windows安装Apache服务器(httpd),添加组件实现Flash播放器在线自由拖放MP4...

Windows下安装Apache服务器(httpd)

Apache服务器的安装分为两种:

安装包版本的安装

压缩包版本的安装

下载完成后解压压缩包,在DOS窗口中运行httpd -h可以查看到如下帮助信息

Usage: C:\\Users\\Administrator\\Documents\\Apache24\\bin\\httpd.exe [-D name] [

-d directory] [-f file]

[-C "directive"]

[-c "directive"]

[-w] [-k start|re

start|stop|shutdown] [-n service_name]

[-k install|confi

g|uninstall] [-n service_name]

[-v] [-V] [-h] [-

l] [-L] [-t] [-T] [-S] [-X]

Options:

-D name : define a name for use in 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 and ServerR

oot

-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 vhost settings

-t -D DUMP_RUN_CFG : show parsed run settings

-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG

-t -D DUMP_MODULES : show all loaded modules

-M : a synonym for -t -D DUMP_MODULES

-t : run syntax check for config files

-T : start without DocumentRoot(s) check

-X : debug mode (only one worker, do not detach)

运行httpd -k install来安Apache服务

8bda12bc458dd6d754945953886320c3.png 出现 The 'Apache2.4' service is successfully installed. 表示已经安装成功

但是现在还无法启动,还需要修改配置文件 httpd.conf 设置ServerRoot目录,如下: 将/Apache24改为自己对应的目录C:/Users/Administrator/Documents/Apache24

38 Define SRVROOT "C:/Users/Administrator/Documents/Apache24"

fc2ad5e05d4f7efb4589519583e0fccd.png

修改完成后试试服务器可以启动了不?

在DOS窗口中运行net start Apache2.4启动Apache服务

839691c77e97277475b07add65f31c9e.png 可以试着在浏览器中访问:http://localhost/,看看是否出现Apache欢迎页面

6bae066bcc7e847014a9a72dc0cbc55f.png 到此,服务器安装就已经完成了---

下载Apache对应的版本的组件

4527fd1216b5ea24341680a6d84f4210.png

下载完成解压后将放mod_h264_streaming.so到Apache的modules目录中去

f7fba1cb4001d59e31b986d4f0acb26d.png

然后再次修改httpd.conf配置文件

LoadModule h264_streaming_module modules/mod_h264_streaming.so

AddHandler h264-streaming.extensions .mp4

将上面内容添加到httpd.conf配置文件中去

b73b1a6f7e179fa9ea2e69f326e3a2de.png OK

我们再次启动Apache服务 net start Apache2.4

8ba8cf563872b194d05420c9b349cf3b.png

O NO

需要先停止Apache服务后才能再次启用,运行net stop Apache2.4来停止Apache服务

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值