win2003下的apache 2.2.6,如何能随系统重启而自动启动?有人说:web用户是匿名用户访问,权限非常低,你应该先设定   apache/bin/apachectl   这个文件为任何人可执行,之后再用   exec("apache/bin/apachectl   start")执行就可以!
----可是我的bin下没有apacheectl这个 文件?请高手指点我。谢谢。

解决方案 »

  1.   

    用wamp 安装的时候会提示你是不是要 开机启动 ,这个很方便的!
      

  2.   

    用以下语句将apache安装为服务,默认开机自动执行:
    apache.exe -k install Apache2
    卸载服务:
    apache.exe -k uninstall Apache2
      

  3.   

    进入"计算机管理"=>"服务和应用程序",找到apache,把它设为自动启动就是了
      

  4.   

    3楼的老兄,你这个法儿我试过了,不行的。WIN2003默认IIS随机启动的,apache即使设为自动启动,它自己也不会启动,而是被iis抢了先。
    2楼的老兄,你这儿法,我不会。我的bin下,是httpd.exe,不是apache.exe.您能否再说详细些?
      

  5.   

    apachectl   这个liunx下的服务器控制文件,你想先运行iis 再运行apache ?
    这两个软件端口冲突,要改下其中之一的端口.你可以把iis服务器停止掉.开机不会启动,再把apache以服务的形式安装,服务设为自动.
      

  6.   

    apachectl   这个liunx下的服务器控制文件,你想先运行iis 再运行apache ?
    这两个软件端口冲突,要改下其中之一的端口.你可以把iis服务器停止掉.开机不会启动,再把apache以服务的形式安装,服务设为自动.
      

  7.   


    IIS 关掉 ,APACHE设置为随机自动启动
      

  8.   

    我在装apache时,装的就是那种:for all users,port on 80,as a service-recommened.当时,我的机子上,还装着IIS,正运行着两个网站。
    按楼上老兄的说法,我把IIS关掉后,重启apache,设为随机启动。可在重启win2003后,IIS就又重启了,apache关掉了。
    请问:这如何处理?
      

  9.   

    端口冲突,要么两者只开一个,要么错开端口。只开一个比较好办,把world wide web service和iis admin以及http ssl这三个服务都取消掉自动运行就可以了。
    错开端口的话可以通过 Internet服务管理器 或者是修改apache的 httpd.conf 来实现。
      

  10.   

    我把asp的设成88这个端口,把php的设成80的端口;IIS和apache都设成自启动。可是,当我重启动系统后,apache没有重启动
    IIS重启动起来了。我要的是,IIS和APACHE都能随系统重启动
    请高手教我!
      

  11.   

    安装为服务就可以了D:\Server\Apache2\bin>Apache.exe /?
    Usage: Apache.exe [-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                : run syntax check for config filesD:\Server\Apache2\bin>
      

  12.   

    我用-k install命令,提示:apache 已安装了。
    ---running none of 1 apache services在服务里,iis运行时,apache无法启动;当我把iis关了后,apache图标就变绿了:running all apache services.启动apache后,再启动iis,成功。难道iis真的有优先权?不解。请教大方之家。
      

  13.   

    晕,将iis 或 APACHE 的端口改掉,都监听80端口当然不行
      

  14.   

    改了,可是还是那样啊!又出现了新问题:IIS网站点击时,出现“与服务器SERVER- 失去联接”。真急死我了!