Configure Apache virtual machine + software download

Source: Internet
Author: User

The first step:

Opens the httpd.conf file in c:/wamp/apache/conf,

Ctrl+f input vhosts in httpd.conf

Find the line, remove the previous #

Operation

Step Two:

Open the master configuration file for the virtual host

The httpd-vhosts.conf in C:/wamp/apache/conf/extra

Get started before you start configuration

Open httpd-vhosts.conf

With the # number in it, you can erase it.

Finally leave these two lines on the line, (<virtualhost *:80></virtualhost>)

Start configuration

Namevirtualhost *:80

Description

Namevirtualhost// domain-based virtual host configuration (meaning: different domain names to access different hosts)

There is at least one space after Namevirtualhost

"*"//refers to all IP addresses of the server.

*:80//About port settings, be sure to maintain consistency with the ports that are configured in the listen in httpd.conf.

Namevirtualhost *:80//Note In the master configuration file for the virtual host, this sentence has only one row .

Main configuration segment for virtual host:

<virtualhost *:80></virtualhost>

Description

VirtualHost space *:80//The main configuration section of the virtual host starts

</VirtualHost>//Virtual host end of main configuration segment

ServerName Space www.sina.com

Description: ServerName//Custom domain name, mainly used for testing the host

DocumentRoot "C:/sina"//Host (website) root directory settings, note: This directory must be present

DirectoryIndex index.php index.html default.php//Host (website) default home page settings, you can set up between multiple spaces separated by a space.

About the settings for directory permissions:

<directory "Directory of Web Sites" > </Directory>//directory permissions are also similar to the configuration section for double labels.

Description: "Directory of the Website"//must be consistent with DocumentRoot.

About the settings for permissions:

Options//About server feature settings, Indexes | None

Indexes//When the default home page does not exist, it is displayed as a list

. Order Deny, allow//settings for host access order

Deny//Deny access

Allow//Permit access

There is a comma between the two words.

Order Deny, allow//access rights are superimposed. The final result of this sentence is to allow all users to access

Order Allow, Deny//access rights are superimposed. The final result of this sentence is to deny all users access to the

Order Allow, Deny

Allow from IP address//Two row overlay, which ultimately allows only specified IP access

Order Deny, allow

Deny from IP address//Two row overlay, eventually only the specified IP access is denied

The difference between indexes and none

The final configuration is this,

Step Three:

Native DNS parsing:

Open the DNS file for this computer--run-->drivers-->etc-->hosts Open

Add a domain name resolution that you define yourself.

Format: IP space Custom domain name

Method 1:127.0.0.1 www.sina.com//Only own access

Method 2: Native NIC IP address www.sina.com//external, others can access

Finally restart Apache

When you enter www.daima.com, you see the following results

Baidu Cloud address for three software

Database

Link: Https://pan.baidu.com/s/1pL5139D Password: 56x3

Php

Link: Https://pan.baidu.com/s/1c2cbHIS Password: uyh9

Apache

Link: https://pan.baidu.com/s/1c2MITZa Password: p3da

Configure Apache virtual machine + software download

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.