Apache2: Installation and Configuration

Source: Internet
Author: User

lamp:linux+Apache+mysql+php

lnmp:linux+nginx+mysql+php


Apache is a Web server, relying on PHP, just like windows IIS relies on ASP.


Nginx is an http and reverse proxy server , and also a imap/pop3/smtp proxy server .


##############################################

Apache Installation and configuration:


Direct installation:

Sudoapt-get Install Apache2

Modify the configuration in the Web test

/etc/apache2/apache2.conf

ServerName localhost:80


Installation package Installation:

apache2 renamed httpd, relying on Apr and apr-util and pcre.


Install Apr and apr-util:

CPAPR Apr-util Httpd/srclib

Cdhttpd/srclib/apr

./configure--PREFIX=/USR/LOCAL/APR

Make

Makeinstall


Cdhttpd/srclib/apr-util

./configure--prefix=/usr/local/apr-util

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

Make

Makeinstall


Install pcre:

Cdpcre

./configure--prefix=/usr/local/pcre

Make

Makeinstall


Install Apache:

./configure--prefix=/usr/local/apache2

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

--with-apr-util=/usr/local/apr-util

--with-pcre=/usr/local/pcre

Make

Makeinstall


To change the configuration:

Sudovi/usr/local/apache2/conf/httpd.conf

ServerName localhost:80


Start the service:

/usr/local/apache2/bin/apachectl–k Start/stop/restart


In the Web test:

http://localhost :


Web page in /usr/local/apache2/htdocs/


Many applications rely on Apache and need to modify the configuration as needed.

The profile that is installed directly is:/etc/apache2/apache2.conf

The profiles that are manually installed are:/usr/local/conf/httpd.conf


Apache2: Installation and Configuration

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.