Install Apache on Hongqi 7 to configure multiple sites

Source: Internet
Author: User
Install Apache on Hongqi 7 and configure multiple sites-general Linux technology-Linux technology and application information. For more information, see the following. [I = s] This post was last edited by johnysqlinux at, 2011-12-14.

1. Download httpd-2.2.21.tar.gz
You can use the command # wget-c http://labs.renren.com/apache-mirror//httpd/httpd-2.2.21.tar.gz
2. install Apache
# Tar-zxvf httpd-2.2.21.tar.gz
# Cd httpd-2.2.21
#./Configure
# Make
# Make install
#/Usr/local/apache2/bin/apachectl start // start apache

3. modify the configuration file
Use KWrite to open the/usr/local/apache2/conf/httpd. conf file and find
Include conf/extra/httpd-vhosts.conf, remove the # above,
Open/usr/local/apache2/conf/extra/httpd-vhosts.conf with KWrite

4. The httpd-vhosts.conf content is as follows:
ServerName 192.168.1.2: 80
NameVirtualHost 192.168.1.2



ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/usr/local/apache2/htdocs"
ServerName 192.168.1.2
# ServerAlias www.dummy-host.example.com
# ErrorLog "log/dummy-host.example.com-error_log"
# CustomLog "logs/dummy-host.example.com-access_log" common



ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "/usr/local/apache2/htdocs/upload"
ServerName test1.www.dga.com
# ServerAlias test1.www.dga.com
# ErrorLog "log/dummy-host.example.com-error_log"
# CustomLog "logs/dummy-host.example.com-access_log" common

5. Description of httpd-vhosts.conf content
A. Restart the apache service.
# Usr/local/apache2/bin/apachectl stop
# Usr/local/apache2/bin/apachectl start
Create an upload folder in B. usr/local/apache2/htdocs.
C. www.dga.com is a domain name
D. the DNS server must point 192.168.1.2 to test1.www.dga.com.
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.