Apache's Build
Knowledge section
• Introduction: Apache is widely used in building enterprise Web servers for its open source code, cross-platform use, support for various programming languages, modular design, and operational security.
Apache was released in 1995 and later passed the Apache group to ASF maintenance and management. All known as "Apache http Server", the official name is "http".
Operation section
1, first the Apache source package unpacked into a directory, the formula to choose to unpack the/usr/src.
2. Switch the directory to/USR/SRC under httpd-2.2.17 to switch the directory to.
3, execute configure configuration Apache. The meanings of each option in the configuration command are as follows:--prefix configuration installation directory,--enable-so for httpd further expansion function,--enable-rewrite enable address rewriting function, convenient site Directory Migration ;--enable-charset-lite enable character set support;--enable-cgi enable CGI scripting support.
4. Make compile and make install start installation
5, confirm whether the installation is successful. Purpose of each directory:/usr/local/httpd/bin is used to store Apache executable files;/usr/local/httpd/conf is used for storing configuration files;/usr/local/httpd/htdocs for storing web pages;/usr/ Local/httpd/logs is used to store log files (two Apache logs, Access_log and Error_log).
6. Optimize Execution path
7. Add Apache system service: First copy Apachectl to/etc/init.d/httpd, then edit
httpd, last chkconfig add
8, edit the/usr/local/httpd/htdocs/index.html, modify the page
9. Edit/usr/lcoal/httpd/conf/httpd.conf to modify Apache configuration file
The main global options for the. conf configuration file mean: ServerRoot set the root directory of the httpd server, default to/usr/local/httpd;listen setting the port number for listening, default to 80;user run httpd process identity, The default is Daemon;group run httpd group identity, the default is daemon;serveradmin to set the administrator's e-mail address, servername set the full hostname; DocumentRoot set the root directory of the Web site, default to/usr/ Local/httpd/htdocs;directoryindex set the site default home page.
Building a Web server with Apache