Lighttpd On Windows

Mon, Apr 6, 2009

Windows

    Setting Up Lighttpd

  1. Download the lighttpd setup file from here. I chose the Setup Wizard (.exe) version.
  2. Double-click on the downloaded executable to start the installation.
  3. When the installation is done go to your lighttpd directory(by default its C:\program files\lighttpd) and run TestMode.bat A console window should open to indicate the server is started.
  4. Go to http://localhost this should show a lighttpd test page.

    Enabling PHP

  1. Download php .zip package from here
  2. Extract it to C:\php
  3. Edit lighttpd-inc.conf (i.e. “C:\Program Files\LightTPD\conf\lighttpd-inc.conf”) with the following:
    1. Remove the comment tag(#) for "mod-cgi" (Line 20)
    2. Add this line (assuming that PHP was installed on C drive):
    3. cgi.assign = ( “.php” => “C:/php/php-cgi.exe” )
  4. In your PHP directory rename the file php.ini-recommended to php.ini and edit php.ini with the following:
    1. short_open_tag = On
    2. display_errors = On
    3. doc_root = “C:\Progra~1\LightTPD\htdocs”

    Testing PHP

  1. You can test php by creating a file containing:
  2. <?php phpinfo(); ?>

    Place the file in your htdocs directory (i.e. “C:\Program Files\LightTPD\htdocs”), open up your browser and browse to the page. It should show you the php info page.

, , , , , , , ,

This post was written by:

- who has written 47 posts on Tuts4Tech.

I am the owner of this website, please feel free to ask me any questions you have

Contact the author

Leave a Reply