Linux Environment Apache Installation

Source: Internet
Author: User

Mayuyu today to install Apache and learn how to use it. Well, don't talk much, next install Apache.

(1) Apache installation and start-up

In the CentOS environment, use the following command to install Apache directly

After the installation is complete, you can use the following command to turn on Apache and turn off Apache services

(2) Apache server configuration

Next look at the Apache configuration file, under directory /etc/httpd/conf , configure the main content to have

1. Global variables

2. Configure the primary server

3. Configure the Virtual host

Because there are too many configuration items, just say a few important ones.

serverroot "/etc/httpd" sets the root directory of the server, which specifies the root directory where Apache's configuration files and log files are stored.

Timeout time-out setting.

Listen 12.34.56.78:80 sets the address binding.

In short, there are two important directories in Apache

(1) configuration directory/ETC/HTTPD

Configure the path to the project in the file welcome.conf of the directory/ETC/HTTPD/CONF.D, as

(2) Document catalogue/var/www

This directory is used to store the project by loading it in the welcome.conf above.

Linux Environment Apache Installation

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.