Configuration of Apache Virtual Host in Ubuntu

Source: Internet
Author: User
In Ubuntu, configure the Apache Virtual Host to enable the site stop method a2ensite/a2dissite. For example, to add an ecshop virtual machine, first create a file ecshop in the/etc/apache2/site-available/directory and add & lt; virtualHost *: 80 & gt; ServerNamewww. ecshop. comServerAdmin5

Configuration of Apache Virtual Host in Ubuntu

How to enable site deactivationA2ensite/a2dissite

For example, add an ecshop Virtual Machine

First, create an ecshop file in the/etc/apache2/site-available/directory and add

ServerName www.ecshop.com

ServerAdmin 519509954 @ qq..com

DocumentRoot "/var/www/ecshop /"

ErrorLog "/var/log/apache2/ecshop_errors.log"

CustomLog "/var/log/apache2/ecshop_accesses.log" common

Then run the sudo a2ensite esshop command.

In this case, the virtual host site ecshop.com has been installed. You can find it in the/etc/apache2/sites-enabled/directory.

An ecshop soft connection is added.

Restart Apache/etc/init. d/apache2 restart.

Then modify the hosts file vi/etc/hosts

In this way, you can access

Finally, the connection between Guan Yu's php and mysql

Usually need to install this apt-get install php5-mysql libapache2-mod-auth-mysql

Related reading:

Ubuntu Apache FastCGI Virtual Machine installation http://www.linuxidc.com/Linux/2013-06/86691.htm

Install and configure the http://www.linuxidc.com/Linux/2013-06/85827.htm for Apache under Ubuntu

Ubuntu uninstalling Apache2 http://www.linuxidc.com/Linux/2013-06/85825.htm completely

LAMP source environment to build WEB Server Linux + Apache + MySQL + PHP http://www.linuxidc.com/Linux/2013-05/84882.htm

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.