Category Archives: Web Server Configuration

Configuring Apache and Bind to support IPv6

Once the basic network connectivity was running, I enabled Apache to support IPv6.

First I added an IPv6 only interface on the VBox Host Internal Network in the Ubuntu server.  The address of this interface is: fdc1:e1f2:425d:2:a00:27ff:fec8:8380

Next I added the following line blow the NameVirtualHost *:80 statement in the /etc/apache2/ports.conf file:

NameVirtualHost *:80
Listen [fdc1:e1f2:425d:2:a00:27ff:fec8:8380]:80

Once the file was updated, I restarted the Apache2 daemon with:

cbroccoli@ubuntuserver:$ sudo apachectl start

Entering netstat -a should show the www service running.  If the interface is not up or if the router is not up, then the apache daemon will not start.

Additionally, bind needs to support AAAA records so that the web server can be accessed by name.

Here I added the following lines to named.conf.local:

zone "broccolifamily.net" { 
 type master;
 file "/etc/bind/db.broccolifamily.net";
 notify no;
 };

Then I added/updated the associated zone file and restarted the bind process:

sudo /etc/init.d/bind9 reload

Everything is working.  nslookup from Windows7 has the following output:

C:\Windows\system32>nslookup www6.broccolifamily.net
Server:  UnKnown
Address:  fdc1:e1f2:425d:2:a00:27ff:fec8:8380
Name:    www6.broccolifamily.net
Address:  fdc1:e1f2:425d:2:a00:27ff:fec8:8380

With Ubuntu, nslookup by itself doesn’t work.  You need to use the -type=AAAA option to get an address back… nslookup -type=AAAA www6.broccolifamily.net.  Putting the name into a browser, however, works without any problems.

b2evolution Setup

Before adding the blog feature to broccolifamily.net I wanted to try and get a blog running on my own.  I also wasn’t sure how to integrate it with the rest of the pages or how exactly it would work.  Fatcow offered a couple of blogging engines (WordPress, b2evolution, etc.).  In the end I selected b2 evolution and downloaded the latest release to Windows and extracted it to my web_projects directory.

b2evo requires that Apache, MySQL, and PHP be installed on the web server. Since I have the Ubuntu server running in VBox, I decided to use it as my web server.  I also installed PhpMyAdmin to allow me to managed MySQL from a web gui.

sudo apt-get install apache
sudo apt-get install mysql-server
sudo apt-get install php5-cli
sudo apt-get install phpmyadmin

Once all 4 were installed, I logged in to phpmyadmin (http://192.168.1.108/phpmyadmin/ ) as root using the password defined when installing MySQL. Added cbroccoli with my standard password and all admin rights.I then created a new database called b2evo with the default characteristics.

Added another user for b2evoltion to access the db: u: b2evo / p: b2evouser

Once this was done, I uploaded the blog directory as a subdirectory in the web site. This allowed me to then open the page: http://192.168.1.xx/blogs/install/index.php to complete the installation.

Once this was done, the dashboard was available and so were the sample blogs.  I followed the instructions to create a new skin as described in:

http://manual.b2evolution.net/Create_a_new_skin

The skin is basically the php code which generates the blog page. Problem is that the code which is listed on the web page is wrong, by copying the core code from one of the other skins (the custom skin), I was able to get my information added to the page. Now it is just a matter of updating the style tags to match the rest of the web site.

Test Environment

My test environment consists primarily of a single generic Compaq PC with a Intel dual core processor with 4G of memory.  It came with 64bit Windows7 installed.

Other than the Windows7 OS running on the PC, I am using exclusively OpenSource software.  I considered replacing Windows with a Linux desktop, but I decided against it since I am also interested in seeing how Windows7 works.  Instead, I downloaded OracleVirtualBox so that I can also install various Linux systems and still keep my Windows desktop.  VBox installed without any problems and I was able to install virtual hosts immediately.  The first host I installed was an Ubuntu desktop.  VBox comes with several networking methods (NAT, bridged, internal network, and host-only network).  Each has its own benefits which are explained very well in the documentation.

Of course being into networks, I have also downloaded and installed GNS3.  GNS3 is a network simulation tool which allows you to build virtual networks.  The virtual devices actually boot images in a similar way that VBox and VMWare install and boot virtual machines.  Thanks to a colleague of mine, I was able to obtain a couple of Cisco IOS images as well as an ASA image.

Once both tools are installed, the two virtual environments work very well together.  GNS3 can see both the VBox host-only network and the Microsoft Loopback adapter, which is bridged to the external LAN (my WLAN in this case).    By doing this you can build an internal network with a number of routers and Vbox end systems all reachable from your normal home devices.

Finally, I have installed Ubuntu virtual server which I use for testing server features.  The Ubuntu server is currently running Apache, MySQL, and PHP so that I could learn about b2evolution (the blogging engine I am using) before integrating it into the web site.

That’s what I have put together so far.  Next step is to add some configuration details of how each piece is configured since it did take some research to get things working and I need to get them documented.