Installing lighttpd under windows

1) Download and install PHP
download the zip package and unzip under c:\

2) Download and install lighttpd
Download win32 version and double click the exe for installation.Use default location for installation “C:\Program Files\Lighttpd”.

3) Start lighttpd
To start lighttpd, go to the lighttpd directory (i.e. “C:\Program Files\lighttpd”), find the file “TestMode.bat” and double-click on it. A console window would open and indicate that the server has been started.

To test that lighttpd is working at this moment, point your browser to http://localhost. You should see a Test Page.

4) Edit lighttpd configuration
Edit the file lighttpd-inc.conf (i.e. “C:\Program Files\Lighttpd\conf\lighttpd-inc.conf”) with the following:

* Remove the comment tag for “mod-cgi”
* Add this line
cgi.assign = ( “.php” => “C:/php/php-cgi.exe” )

5) Edit PHP Configurations
In PHP directory, rename the file php.ini-recommended to php.ini and edit php.ini with the following:

* short_open_tag = On
* display_errors = On
* doc_root = “C:\Progra~1\Lighttpd\htdocs”

6) Test PHP pages serving lighttpd
Create a file info.php under C:\Program Files\Lighttpd\htdocs
Edit the file info.php and add
<?php phpinfo(); ?>

Save the file and open up browser type http://localhost/info.php

Will get the php informations.

Posted on November 23, 2013, in Uncategorized, Web, Windows. Bookmark the permalink. Leave a comment.

Leave a comment