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