Apache HTTP Server builds a virtual host

Source: Internet
Author: User
Tags openssl

Apache Introduction

The Apache HTTP Server project is a cross-platform open source HTTP Server software that can be run on platforms such as Windows and UNIX, with the goal of providing a secure, efficient, extensible HTTP service. Apache httpd has become the world's number one Web server software since its release in 1996. The latest stable version of the Apache httpd is 2.4.4. Install Apache httpd software can choose source installation or binary package installation, but because the source code installation is a customizable installation method, this kind of installation flexibility is relatively large, can meet the different needs of the enterprise environment. Binary package installed in the CentOS 6.3 system can choose the RPM package installation, the biggest advantage of this installation is simple and quick. This book uses the source code installation package, because the source code installation requires a large number of dependent packages, you need to install these dependent software packages.

Apache HTTP Sever Very important feature is that she adopted a modular design model, the Apache module is divided into static modules and dynamic modules, the static module is the most basic Apache module, is unable to add and unload the module at any time, the static module in the compilation of software settings. Dynamic modules can be added at any time to delete the module, such a design allows the enterprise to deploy Apache can obtain the greatest flexibility, each enterprise can be based on their own platform and the actual needs of the installation of different module functions. The Apache module will be compiled as a dynamic shared object (DSOs), which is independent of the HTTPD program, the DSO module can be added in compiling Apache, or can be added at any later time through the Apache Extension Tool (APXS) tool. After the Apache HTTP Server Software Installation is complete, you can use Httpd–m to view the module load list.

Install the Apache software

1. Download package

[Root@centos6 ~]# wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.4.tar.gz

[Root@centos6 ~]# wget http://mirror.bjtu.edu.cn/apache/apr/apr-1.4.6.tar.gz

[Root@centos6 ~]# wget http://mirror.bjtu.edu.cn/apache/apr/apr-util-1.5.2.tar.gz

2. Installation software

[ROOT@CENTOS6 ~]# yum–y install gcc autoconf automake make \

> Pcre pcre-devel OpenSSL openssl-devel

[Root@centos6 ~]# Tar–xzf httpd-2.4.4.tar.gz–c/usr/src/

[Root@centos6 ~]# Tar–xzf apr-1.4.6.tar.gz–c/usr/src/

[Root@centos6 ~]# Tar–xzf apr-util-1.5.2.tar.gz–c/usr/src/

[Root@centos6 ~]# cd/usr/src/apr-1.4.6/

[Root@centos6 apr-1.4.6]#./configure--with-apr=/usr/local/apr/

[Root@centos6 apr-1.4.6]# make && make install

[Root@centos6 apr-1.4.6]# cd/usr/src/apr-util-1.5.2/

[Root@centos6 apr-util-1.5.2]#./configure--with-apr=/usr/local/apr/

[Root@centos6 apr-util-1.5.2]# make && make install

[Root@centos6 apr-util-1.5.2]# cd/usr/src/httpd-2.4.4/

[Root@centos6 httpd-2.4.4]#./configure–prefix=/usr/local/apache2–enable-so \

>--enable-ssl--enable-rewrite–with-mpm=worker–with-suexec-bin \

>--with-apr=/usr/local/apr/

[Root@centos6 httpd-2.4.4]# make && make install

Configure scripts are used to check the system environment, find dependent files, set installation paths, and so on, configure have many parameters, and readers can view all the parameters that the script supports by using the./configure--help.

The following is the Configure common parameter description:

Parameter description

--PREFIX Specifies the installation home directory for the Apache httpd program

--enable-so Open Modular function, support DSO (dynamic shared object)

--ENABLE-SSL supports SSL encryption

--enable-rewrite Support Address Rewriting

--WITH-MPM set Apache httpd working mode

--with-suexec-bin supports SUID, SGID

--WITH-APR Specify APR Program absolute path

Related Article

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.