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

Windows下安装Apache服务器(httpd)

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

  • 安装包版本的安装
  • 压缩包版本的安装

###下面主要是压缩包版本的安装 服务器官网:http://httpd.apache.org/

Windows版本下载地址:http://www.apachehaus.com/cgi-bin/download.plx 下载

  • 下载完成后解压压缩包,在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 <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 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服务 安装 出现 The 'Apache2.4' service is successfully installed. 表示已经安装成功
  • 但是现在还无法启动,还需要修改配置文件 httpd.conf 设置ServerRoot目录,如下: 将/Apache24改为自己对应的目录C:/Users/Administrator/Documents/Apache24
38 Define SRVROOT "C:/Users/Administrator/Documents/Apache24"

修改配置

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

  • 在DOS窗口中运行net start Apache2.4启动Apache服务 启动 可以试着在浏览器中访问:http://localhost/,看看是否出现Apache欢迎页面 访问 到此,服务器安装就已经完成了---

###接着安装mod_h264_streaming.so 组件网站:https://www.apachehaus.net/modules/

组件下载(mod_h264_streaming):https://www.apachehaus.net/modules/mod_h264_streaming/

组件官网(mod_h264_streaming):http://h264.code-shop.com/trac 组件网站

  • 下载Apache对应的版本的组件 组件下载

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

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

LoadModule h264_streaming_module modules/mod_h264_streaming.so 
AddHandler h264-streaming.extensions .mp4

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

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

O NO

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

转载于:https://my.oschina.net/mleo/blog/465109

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值