Apache Talking IPv6
IP version 6 (IPv6) is the newest version of the Internet Protocol, designed by the IETF as a successor to IP version 4 (IPv4). In this article, we address the case of running the Apache web server over IPv6.
According to the Netcraft web server survey, Apache has been the most popular web server on the Internet since April 1996. Currently, over 56% of all web servers run Apache. These numbers come as no surprise due to Apache's portability over multiple platforms, reliability, robustness, configurability, and the fact that it is free and well documented.
Apache 1.3 has established itself as a high-performance web server. However, with the evolution of requirements imposed on web servers, new functionalities, such as higher reliability, security and performance and scalability are required. In response, Apache continued its drive to satisfy these new requirements with version 2.0, promising a more robust and faster web server with new and enhanced functionalities.
Apache 2.0 offers numerous performance improvements (the subject of an article I wrote for the Linux Journal web site, www.linuxjournal.com/articles/4559). However, as far as this article is concerned, one of the new features is support for IPv6. With the 2.0 version, if you run Apache on systems where IPv6 support exists, Apache gets IPv6 listening sockets by default. Additionally, the Listen, NameVirtualHost and VirtualHost directives also support IPv6 numeric address strings.
In the following sections, we demonstrate how to add support for IPv6 in the Linux kernel and then show how to install the latest Apache version and run it with IPv6 support. We also run some benchmarking tests to compare the performance of the same server servicing requests using IPv4 and IPv6.
In this section, we briefly describe how to enable IPv6 in the Linux kernel, a prerequisite to enable IPv6 HTTP requests. You may already have IPv6 support in your kernel [see page 64]. To add it, the first step is to download a stable Linux kernel and uncompress it. For our testing we downloaded kernel 2.4.8 from kernel.org.
We configured the kernel to enable support for IPv6. There are two options you need to enable. In the Code Maturity Level section, you need to enable "Prompt for development and/or incomplete code/drivers".
And in the Networking Options section, you need to enable "IPv6 Protocol (EXPERIMENTAL)".
You can choose to compile the IPv6 support within the kernel or as a separate module, depending on your preference. After that, compile and install the kernel and modules as usual, then reboot with IPv6 support.
See the Kernel HOWTO for details on the kernel build and install process (www.tldp.org/HOWTO/Kernel-HOWTO.html).
Now that your kernel supports IPv6, you are ready to install Apache and run it with IPv6 support. First, download the latest Apache distribution from www.apache.org/dist/httpd into /tmp. For illustrative purposes we use Apache 2.0.16; however, the same procedure applies to newer versions. Extract the source:
cd /tmp tar xzvf httpd-2_0_16-beta.tar.gz
which will create a new directory, httpd-2_0_16, containing the source code. To configure Apache for your platform and specific requirements, use the configure script included in the root directory of the distribution. You should cd into the httpd-2_0_16 directory and type ./configure at the shell prompt. If you want to know all the options you could pass to the configuration script, type ./configure --help. To change the default options, the configure script accepts a variety of variables and command-line options. One of the options is the location prefix where Apache is to be installed. By default, Apache will install into /usr/local/apache. If you want to install Apache in /usr/local/apache-2_0_16, for instance, type:
./configure --prefix=/usr/local/apache-2_0_16The same applies for other options. When configure is run it will take a few seconds to test for the availability of features on your system and build Makefiles that will be used to compile the server. After running the configuration script, you can build the various parts that form the Apache package by running make && make install. This will compile Apache and install all the files in /usr/local/apache-2_0_16. The next step is to customize the Apache HTTP server by editing the httpd.conf file under /usr/local/apache-2_0_16/conf or, if you have used a different prefix, under prefix/conf/:
vi prefix/conf/httpd.conf
The must-edit configuration variables include ServerAdmin, your
e-mail address (so you will be alerted in case the server has
problems); ServerName, the name or IP of the server; and Port, the
port to which the server should listen.
The httpd.conf comes with a lot of explanations, and it is easy to read, understand and customize. However, if you need more details on the configuration directives, you can read the Apache manual either locally under the docs/manual/ in the Apache installation directory or on the Web at httpd.apache.org/docs.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- RSS Feeds
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Designing Electronics with Linux
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Validate an E-Mail Address with PHP, the Right Way
- What's the tweeting protocol?
- Kernel Problem
7 hours 57 min ago - BASH script to log IPs on public web server
12 hours 24 min ago - DynDNS
16 hours 44 sec ago - Reply to comment | Linux Journal
16 hours 33 min ago - All the articles you talked
18 hours 56 min ago - All the articles you talked
18 hours 59 min ago - All the articles you talked
19 hours 1 min ago - myip
23 hours 25 min ago - Keeping track of IP address
1 day 1 hour ago - Roll your own dynamic dns
1 day 6 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
IPv6 for Apache 1.3.41
There is a patch for apache 1.3.41 that adds support for IPv6: http://www.teddy.ch/apache_1.3_ipv6/
IPv6 for Apache 1.3.41
There is a patch for apache 1.3.41 that adds support for IPv6: http://www.teddy.ch/apache_1.3_ipv6/