somethings from codeland

Wednesday, December 28, 2005

Apache for cygwin

To test out wordpress 2.0 on a project at work I am attempting to make apache for cygwin a native windows service. I found that cygrun -I

http://httpd.apache.org/docs/1.3/cygwin.html#serv


  • Installing Apache as a new Service

    Use the following statement to install
    httpd.exe as a new service:


      $ cygrunsrv -I service_name-p /usr/local/apache/bin/httpd.exe 
    [-a arguments] [-e VAR=VALUE] [-t auto|manual]
    [-u user] [-w passwd]



    Where -a is used to pass command line
    arguments (such as -DFOO defines) to
    httpd.exe, and -e is used to pass
    environment variables. If necessary you may use the
    -t options to set the autostart configuration
    for the service. If you want the new service to run under a
    different userid, you will have to supply the
    -u and -w options.






  • Starting Apache as a Service

    After the new service is installed it can be started
    using the following command:


      $ cygrunsrv -S service_name


    Check your process table and global
    error_log file to ensure Apache has started
    without any major problems.






  • Stopping an Apache Service

    A running Apache service may be stopped using the
    following command:


      $ cygrunsrv -E service_name


    This will stop all running httpd.exe

    processes and shutdown the HTTP service for the
    machine.





  • Removing an Apache Service

    An installed Apache service may be removed from Windows
    NT or Windows 2000 using the following command:


      $ cygrunsrv -R service_name



    This will remove your previously defined and installed
    service from the machine.

  • No comments:

    Twitter Updates

    About Me

    My photo
    I have been working with computers/programming to put myself through college since I graduated high school. I am currently attending Oklahoma State University for bachelors degree in biological sciences. Along with my experience in programming, a degree in biology will allow me to pursue a career in bioinformatics research concerning genetic diseases (i.e. cancer).

    Blog Archive