Description www server use linux build (a)


linux can say is currently the hottest network operating system, and on the Internet, 29% of the The server uses linux system, which is 6 percentage points higher than Windows NT. This is not only because linux is free, but also because of its excellent performance and excellent performance on the network server. This article is a brief discussion about using linux to build a www server.

I. About hardware configuration

The operating system must work closely with the basic hardware system to fully play its role. Linux can support most common hardware devices. As far as the CPU is concerned, the current full range of Intel 386 and above, AMD's K6-2 (3DNow), K6-3 and Cyrix 6x86 and other common CPUs are no problem. A detailed list of hardware is available on the linux home page (

Second, use linux as a www server

In order to use linux as a www server, you need to configure accordingly, install the required software package.
Currently, there are many WWW Server software that can run under Linux. The most popular ones are NCSA HTTPd Server and Apache. In particular, Apache is known as the "king of WWW Server" (in fact, it is also developed from NCSA). Apache is included in the latest Red Hat, Slackware, and OpenLinux versions. Redhat 5.2 itself comes with Apache 1.3.

1. Install Apache

The latest version of Apache can be found on the linux FTP server on the Internet. Apache is generally included on the Linux distribution. For red hat, you can use the following command line to install the Apache rpm package:
# rpm –ivh apache –xxx i386.rpm (where xxx is the version number)
Launch Netscape Navigator in X-Window , type the local IP, when the "It worked" page appears, you can configure the work. Note: The default working root directory of the server in different versions is different. The default red hat is /etc/httpd. The configuration file is in the /etc/httpd/conf directory. The system startup script is in the /etc/rc.d/directory. The page file is in the /home/httpd directory.

2, set the basic configuration file

Apache has three basic configuration files: httpd.conf, srm.conf and access.conf, which are located in the conf/subdirectory of the root directory (their A copy also exists here). Their role is described as follows: httpd.conf is the most important configuration file in the Apache settings file, httpd.conf will be read first when the httpd program starts. Srm.conf is the data configuration file. In this file, the WWW Server is used to read the directory of the file, the directory index, and so on. Access.conf is responsible for basic read file control, limiting the functions that the directory can perform and the permissions settings for accessing the directory.

(1). Httpd.conf file
TransferLog: If you want to know how many people access your site over a period of time, the best way is to look at the corresponding log file. The TransferLog command specifies that when the browser asks the server to transfer the file. The set file can be used to check which HTML files have been viewed by users.

ErrorLog: This is to specify which file the error message is stored when a problem occurs during the operation of the WWW Server. If the file name does not start with a slash, it is equal to the server root (default is logs/error_log).

Port number: The default port in httpd:URL is 80.
ServerAdmin email_address: This command sets the system administrator's E_mail address. When there is a problem with the server, the client will display a message to report the problem to the Web Master.
ServerRoot directory: This command is used to set the absolute path of the server directory, from which the server knows where to find resources. VirtualHost: This command is used to set up a virtual host, that is, a WWW Server that executes multiple domain names with one host.

Copyright © Windows knowledge All Rights Reserved