Apache

Posted by ejhildreth

Now that KAMP has successfully been set up on a Kubuntu box, setting up multiple sites on one server is the next logical step. This allows you to do Drupal testing in multiple versions/setups at the same time on one localhost server. To begin, open up Konsole (command line utility) and change to the Apache2 sites-available directory (this is where Apache stores the setup files for each Virtual Host):

cd /etc/apache2/sites-available/

Next, login as root and copy the existing default setup file and name it to the "server" you want to use:

sudo -s (prompts you for your password)
cp default exampleSite

Using your favorite text editor, modify the newly copied file so that it points to the correct files (using VI in this example):

vi exampleSite

Modify/Add the following lines:

NameVirtualHost * to NameVirtualHost exampleSite:80
<VirtualHost *> to <VirtualHost exampleSite:80>
Add ServerName exampleSite
DocumentRoot /var/www/ to DocumentRoot /var/www/exampleSite/

Continue reading...
Posted by ejhildreth

Lullabot developer Addi Berry put together some great screencasts on how to setup local Drupal test environments on Windows, Mac, and Ubuntu. Even though I have been running Kubuntu as my primary OS at home for over a month now, I hadn't actually set up my test server yet! To make sure I didn't make a misstep, I used Addi's video as the basis for the setup I did on my machine, but command lineified it a bit:

  1. Open Konsole
  2. Login as root
    • sudo -s
  3. Make sure that the repository is up to date
    • apt-get update
  4. Install Apache, MySQL, PHP5, the PHP5 GD Library, and the PHP5 MySQL configuration
    • apt-get install apache2 mysql-client mysql-server php5 php5-gd php5-mysql
  5. Enable Clean URLs in the conf file
    • vi /etc/apache2/sites-enabled/000-default
    • press i to go into insert mode
    • Change AllowOverride None to AllowOverride All in the <Directory /var/www/> section
    • press esc
Continue reading...