Dedeampz how to set up a local test for multiple sites

Source: Internet
Author: User
Tags web hosting

How to Use dedeampz to create a local test for multiple sites

Namevirtualhost *: 80

# Vhoststart

# The default site settings here. If the IP address of an unknown domain name is the same as that of the server, it will also point to this site
# If you want to access your service through an IP address or illegal domain name, set the directory of the site to a non-existent directory.
<Virtualhost *: 80>
Serveradmin admin@myhost.com
DocumentRoot "D:/dedeampz/webroot/Default"
Php_admin_value open_basedir "D:/dedeampz/webroot/Default"
Servername localhost

Errorlog logs/default-error_log
Customlog logs/default-access_log common
</Virtualhost>

# Here is an example of setting up a virtual host (running multiple sites on the server)
# If you want to add a website, copy the following configuration and modify the Directory and domain name.
<Virtualhost *: 80>
Serveradmin admin@myhost.com
Servername www.test.com
Serveralias test.com
DocumentRoot "D:/dedeampz/webroot/test.com"
Php_admin_value open_basedir "D:/dedeampz/webroot/test.com"
Errorlog logs/all-error_log
Customlog logs/all-access_log common
</Virtualhost>
# Vhostend

If you only debug one website, you do not need to add a VM to directly decompress Wordpress to "dedeampz \ webroot \ default"

If you want to debug multiple websites in this environment, you can add virtual hosts as instructed. Note the following:

Servername www.test.com# You can enter the domain name of your VM. You can change the host file later.
Serveralias test.com# Remove the host name, which must be the same later
DocumentRoot "D:/dedeampz/webroot/test.com"# The path of your Vm, where you install it
Php_admin_value open_basedir "D:/dedeampz/webroot/test.com"# Same as above

Attach a copy of my configuration file for reference

Namevirtualhost *: 80

# Vhoststart

# The default site settings here. If the IP address of an unknown domain name is the same as that of the server, it will also point to this site
# If you want to access your service through an IP address or illegal domain name, set the directory of the site to a non-existent directory.
<Virtualhost *: 80>
Serveradmin admin@myhost.com
DocumentRoot "D:/dedeampz/webroot/Default"
Php_admin_value open_basedir "D:/dedeampz/webroot/Default"
Servername localhost

Errorlog logs/default-error_log
Customlog logs/default-access_log common
</Virtualhost>

# Here is an example of setting up a virtual host (running multiple sites on the server)
# If you want to add a website, copy the following configuration and modify the Directory and domain name.
<Virtualhost *: 80>
Serveradmin admin@myhost.com
Servername www.test.com
Serveralias test.com
DocumentRoot "D:/dedeampz/webroot/test.com"
Php_admin_value open_basedir "D:/dedeampz/webroot/test.com"
Errorlog logs/all-error_log
Customlog logs/all-access_log common
</Virtualhost>

<Virtualhost *: 80>
Serveradmin admin@myhost.com
Servername www.wp.com
Serveralias wp.com
DocumentRoot "D:/dedeampz/webroot/wp.com"
Php_admin_value open_basedir "D:/dedeampz/webroot/wp.com"
Errorlog logs/all-error_log
Customlog logs/all-access_log common
</Virtualhost>

# Vhostend

I added a web hosting www.wp.com.

Next, you need to modify the local host file. You need to direct the Domain Name of the VM you added to your computer. Add the following to my host file:Code

127.0.0.1 www.test.com

127.0.0.1 www.wp.com

Then, place a webpage file such as test.html in D: \ deampz \ webroot \ wp.com.

Test entering the http://www.wp.com/test.html in the browser to see if access is normal.

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.