06 September
How-to Tutorials

Using LightTPD with XAMPP on windows

I recently setup LighbetTPD on my machine because there is a need for me to use LightTPD server to achieve a video delivery with HTTP Pseudo-Streaming.  I decided to install it on windows since I use windows more often for development. The H264 streaming module works well on Apache but I am working more with the FLV streaming module which works well on LightTPD. I once tried installing mod_flvx.c on RH5 for Apache but it seems not to work well for me.

I had to dive into LightTPD and I think it’s a great decision. Prior to the installation of LightTPD on windows, I use the Apache on XAMPP as my web server. So, I will like to show you how I use the PHP (and MySQL – this will work well anyway, as far as the service is running) in XAMPP for LightTPD. You may be thinking; “why would you wanna do that since there is a WLMP webserver package that has all in one?”. Well the answer is: “I want to keep my Apache server and I don’t want to have two MySQL server or have two instance of php.ini file”. So follow this simple steps:

Firstly, download the Win32 version of LightTPD from the WLMP Project; I prefer using the win32 version, you can use the .zip one if you want to.

Double-click on the downloaded file to install LightTPD on windows. By default, the installation directory is “C:Program FilesLightTPD” but I mine was installed in D:LightTPD since my XAMPP is in the same D: drive.

After completing the installation, you will need to start the server by going to the LightTPD directory and look for the file ‘TestMode.bat’. Double click on it to start the server; a console window opens to indicate the server has started successfully. If you have port 80 in use, you will come across an error saying: can’t bind to port: 80 Address already in use. The default server.port on LightTPD is 80. Since my Apache is runing on port 80, I will have to modify the lighttpd-inc.conf file for LightTPD to work with an alternative port like 81 or 8080.

Open [LightTPD-Directory]conflighttpd-inc.conf, remove the comment for server.port = 80 and modify the value to whatever port you want to use; as far as it’s not in use. Mine is server.port = 81. Save and run the ‘TestMode.bat’ again. If everything is set properly, the server will start.

Navigate or point your browser to http://localhost/ or to see if LightTPD server is working.

Now you will have to configure the lighttpd-inc.conf to work with PHP. The PHP I used is actually that of XAMPP as I mentioned earlier. So modify cgi.assign value to “.php” => “D:xamppphpphp-cgi.exe” [D:xampp should be your XAMPP installation directory]

Modify other necessary lines you will/might need.

mod_flv_streaming is need (by me)
mod_rewrite is so need ( by me )
and so on.

To avoid the cygwin warning seen earlier, set the server.document-root value to have a forward slashes without the D: or C: as in “/Inetpub/wwwroot/”

After all modification, save the file; press Ctl+C on the console window to shutdown the server and re-launch, i.e double-click on ‘TestMode.bat’ to start the server again. You can also set LightTPD to run as a service. Open [LightTPD-Directory]bin and double-click on Service-Install.exe to install the service.

You are set and good to go. To test if PHP is working, create a .php file with this content

Place the file in the htdocs directory, mine is D:Inetpubwwwroot and navigate to the URL, i.e You should be able to see the standard phpinfo() details.

That’s it!

I hope you’ll get this if you want to install LightTPD this way. Thanks for reading and please leave a comment to let me know how far it goes.

Related Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Comments

Mayusha Mathew
2016-10-07 07:12:25
Good Thought.....
2016-08-05 10:53:34
Great post, but some of these links are unusable now, please check....
2016-01-12 17:02:25
i guess you should install KrojamSoft FilesSearch and see if it can help...

Popular Posts

Useful Tools For Your Tweets
19 September 2010
How-to, Tutorials
Useful Tools For Your Tweets
Twitter is growing really fast and attention is getting shifted to tweets every minute. The common phrase I see on most Facebook status update is 'Follow me @blablabla'. The truth is, am not a twitter freak but I found twitter really useful, I mean so useful. I read peoples' tweet everyday and I found it informative and entertaining; so the need to get real-time update arose in me and I decide to find useful tools that can help me stay up-to-tweet.
HowTo: Enable “Administrator” account on Windows 7
11 January 2011
How-to, Tutorials
HowTo: Enable “Administrator” account on Windows 7
To enable "Administrator" account on windows: Open command prompt(START MENU -> RUN. Type CMD and press enter) and type in this command: net user administrator /active:yes To disable: net user administrator /active:no" >RUN. Type CMD and press enter) and type in this command: net user administrator /active:yes To disable: net user administrator /active:no" >To enable "Administrator" account on windows: Open command prompt(START MENU -> RUN. Type CMD and press enter) and type in this command: net user administrator /active:yes To disable: net user administrator /active:no
HowTo: Restore Files Hidden by Virus on Windows 7
09 January 2011
How-to, Tutorials
HowTo: Restore Files Hidden by Virus on Windows 7
I recently had a challenge of recovering lots of folders hidden by a virus on a drive. Some virus always hide files and folders in an external drive and create a new folder with an extension like .exe, .lnk and so on just to fake users to a malicious act. The truth is, most anti-virus will detect this virus and remove it, but it doesn't return or restore the files and folders hidden by the virus. This is the 'headache spot'!