Build a Web server with Apache

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.