Creating a Web server under Linux can choose Netscape's Enterprise Server or use Apache, the free software. Netscape can fully support ip-based virtual hosts, but it does not support domain-based virtual hosts, so only the outermost layer of Web pages can be displayed. Ip-based virtual host requires a separate IP; A domain-based virtual host can share an IP with multiple virtual hosts. Using the HTTP 1.1 protocol, depending on the domain name to differentiate can greatly save IP address resources. Apache fully supports both of these virtual host methods and overcomes the frequent service stopper of Netscape. Apache is currently a widely used Web server on the Internet. Here's how to use Apache to set up your own Web server.
Installation
First we want to introduce the Apache installation process.
First, go to http://www.apache.org to download the latest version of Apache. If it is under Windows, download the file in C, the C disk corresponds to/DEV/HDA1 in Linux.
Second, go to Linux and log in as root and hook up the file system.
# mkdir C
# mount-t VFAT/DEV/HDA1/C
Because we put the Apache source in the C disk, we now have to mount it to the new directory/C.
Third, copy this program to/TMP for operation.
#cp/c/apache_1.3.9.tar.gz/tmp
Note: All filenames under Linux are case-sensitive. Next, we need to extract the source code from the compression package. The corresponding commands are:
#cd/tmp
#tar ZXVF apache_ 1.3.9.tar.gz
After decompression, enter the directory where the source is stored, and use the compile configuration script to set up the environment.
#cd/tmp/apache_1.3.9
#./configure--sysconfdir=/etc/httpd
--datadir=/home/httpd
--logfiledir=/var/log/httpd
--enable-module=most
--enable-shared=max
--disable-rule= Wanthsregex