Phase IV 10_linux Apache installation and configuration

Source: Internet
Author: User

Apache Static Web page

1. Installation

Yum Install Httpd-y

2. Configuration files


VI httpd.conf

httpd.conf File Individual line explanation

var email view Mail

ServerName Remove comments or you will see a message similar to the error

documentroot/var/www/html static Web page storage location

DirectoryIndex Default Open Homepage

Loglevel warn log level

Logfmart log Format

Alias Virtual Name

AddType adding modules

Virutal Hosting Virtual Host (01. IP 02. Domain name 03. Port)


Service httpd Start

Service iptables status Shutdown firewall

View SELinux modified SELinux values



Apache script installation and setup



Yum Install Httpd-y

Rpm-qa|grep httpd && echo "httpd has been created"


MV Httpd.conf Httpd.conf.bak

awk '/ServerName www\.example/{print "ServerName"; Netxt}{print} '

Rm-f Httpd.comf.bak

Server httpd Restart

Chkconfig httpd on

echo "Test HTML page" >/var/www/html/index.html

echo "Now can interview the page by Brower"


Phase IV 10_linux Apache 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: 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.