Introduction

One of the ideas mentioned was to use Puppy LINUX as a small development web server enabling web development on the move. Simply take your laptop/netbook and a USB pen drive pre-installed with Puppy LINUX and the LAMP stack and you can develop web pages whilst travelling on the train. Someone left a comment asking how this could be done.

This is the 1st of a series of posts detailing how to set up the LAMP stack within Puppy LINUX.

Initial Setup

I have taken a 2gb USB drive and I have installed Lucid Puppy on it as this is the easiest and for me most complete version of Puppy LINUX.

I installed Firefox and set up the wireless connection and then I created a 512mb save file and rebooted the PC.

The following steps will show you how to install Apache within Lucid PUPPY.

Installing Apache

1. Click the install icon on the top row.

2. Click the "Configure Package Manager" button in the bottom left corner.

3. Select the 3 Ubuntu repositories and click OK.
4. Exit the installer and restart it by clicking install again.

8. Install the selected packages
9. Run through all the installers until all the packages are installed

10. Open a console a nd type /etc/init.d/apache2 restart

11. You will receive an error stating that libaprutil-1.so.0 could not be found. You now need to install this from the repositories. Click install to bring up the package manager and type libapr

12. Install the libapr-1 package.

13. Install the libaprutil1 package

14. From the console window type /etc/init.d/apache2 restart again. You will get a window just like the one above.
15. Typing Apache2 brings up the real issue which is that httpd.conf could not be found. Go to /etc/apache2 and type "nicoedit httpd.conf". Nicoedit is the default editor within Lucid Puppy.
16. Enter the following line in the Nicoedit window DocumentRoot "/var/www/htdocs"
17. Save the file

NB: You can add all the httpd.conf commands you would normally use within httpd.conf. The steps above create a basic shell required to get Apache running

18. Type /etc/init.d/apache2 restart again. Still it does not work.

19. Type adduser www-data. When asked for a password you can just press return. (Although adding a password would make it more secure the point of this exercise is to set up a development server for when you are on the move).

20. Type /etc/init.d/apache2 restart again. Still it does not work.This time you get an error about missing modules.

21. The above screenshot gives the commands that need to be entered to load the modules in.

a2enmod authz_host
a2enmod mime
a2enmod alias
a2enmod setenvif

22. Type /etc/init.d/apache2 restart again. Still it does not work but we are getting close now. The error is basically stating that the folder we set in httpd.conf does not exist. Enter mkdir /var/www/htdocs.

23. Type /etc/init.d/apache2 restart again. It should now work.
24. Navigate to /var/www/htdocs and create a file called test.html.
25. Enter the following code into test.html

Summary

It took a fair bit of effort getting Apache working but it is possible to do so and as you can see from the screenshot above it runs.

This guide should not be used to create a production Apache server using Puppy. The concept of this guide is to get a working version of Apache within Puppy LINUX for use as a development platform when on the move.

hey can you explain more steps: "15-17""15. Typing Apache2 brings up the real issue which is that httpd.conf could not be found. Go to /etc/apache2 and type "nicoedit httpd.conf". Nicoedit is the default editor within Lucid Puppy.16. Enter the following line in the Nicoedit window DocumentRoot "/var/www/htdocs"17. Save the file"thanks...

Thank you Gary..."nicoedit /etc/apache2/httpd.conf" command opened a completely blank text file. Then I typed: "/var/www/htdocs" (step 16) and saved (step 17) the file.then I had typed "/etc/init.d/apache2 restart" in console and the result is:"Restarting web server: apache2 ... failed!You may still have some apache2 processes running. There areprocesses named 'apache2' which do not match your pid file,and in the name of safety, we've left them alone. Please reviewthe situation by hand.apache2: Syntax error on line 212 of /etc/apache2/apache2.conf: Could not open configuration file httpd.conf: No such file or directory"

Rather than use the comments section of the blog to troubleshoot it would probably be better to do troubleshoot via email. My email address is everydaylinuxusergmail.com. (Replace the with the symbol).

Off the top of my head have you finished all the other steps in the sequence?

Is the path within apache2.conf pointing to a different folder for httpd.conf? (in a console type niooedit /etc/apache2/apache2.conf and look at line 212).

Hi I also need help with step 15-17. When I type /etc/apache 2 and pres enter it says sh:/etc/apache2: is directoryThen I type nicoedit httpd.conf end it open a NicoEdit and say Unable to open file! What to do next? What name do I use when I have to save? DO I type all of this DocumentRoot "/var/www/htdocs" in text file or just "/var/www/htdocs"