Sunday, February 26, 2017

Making a Test Web Server

I had decided to create a test web server that was ran in a virtual machine.  To minimize the system overhead of running the test web server, I elected to use Arch Linux without a desktop environment running.  Some searching of the internet failed to reveal anything explicitly useful, but a number of useful pieces were found.

This webpage was the first piece in the puzzle of making an ArchLinux web server test box.  This site gave an excellent overview, but there were a few things that were wonky.  In particular, the keyboard suggestion, don't do what it suggests, just use the default (unless you really do need to change it).

The second piece to the puzzle, was this site, which clarified what needed to be done to create the web server itself.

This third piece of the puzzle was this site, which provided the information needed to mount a virtualbox share from within the guest.  This allowed me to use my primary desktop to edit the PHP files easily.

Finally there was this piece that provided nice clear set of instructions on getting the phpMyAdmin up and running.  Of particular note at this stage was the use of this line of code for the web site that I was working on.  It allowed me to set up a test user to have access to a specific database, in a manner similar to what happens on the real server.
GRANT SELECT, INSERT, UPDATE, DELETE ON <pma_db>.* TO 'pma'@'localhost';
 Overall, it didn't take too long to put together, get working and it provided a test web server that was fairly resource light on my primary desktop.  Additionally, it only ran when I wanted it running by just launching that particular virtual machine.

No comments: