Web Service httpd Virtual host configuration you made it?

Source: Internet
Author: User

First, the classification of httpd virtual host

1. IP address-based virtual host


2. Port-based virtual host


3. Domain-based virtual host


Second, configure the virtual host

Lab environment: CENTOS6, httpd service installed with Yum

Preparation: Note The DocumentRoot site root of the hub host, create the/etc/httpd/conf.d/vhosts.conf configuration file, create the site directory required by the experiment: mkdir-pv/www/{a.com,b.net,c.org}/ Htdocs, check syntax every time you modify a mate file: Httpd-t Restart Service: Services httpd restart

Note: When you configure a domain-based virtual host, add: Namevirtualhost ip_address:port


1, based on the IP address of the virtual host, edit the vhosts.conf configuration file, as shown:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/87/FB/wKioL1fmhAuBwFXZAABIgJkecbo011.png "title=" Ippeizhi.png "alt=" Wkiol1fmhaubwfxzaabigjkecbo011.png "/>


Experimental Test diagram:


650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/87/FE/wKiom1fmhNfBpI7SAAB_FVI1KcA162.png "title=" ip.png "alt=" Wkiom1fmhnfbpi7saab_fvi1kca162.png "/>


2. Port-based virtual host

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/87/FE/wKiom1fmhRKjW6lSAABHBquT2tA297.png "title=" Duankoupeizhi.png "alt=" Wkiom1fmhrkjw6lsaabhbqut2ta297.png "/>


Experimental Test diagram:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/87/FF/wKiom1fmhWCw0cvxAACAPWjJuGU489.png "title=" Duankou.png "alt=" Wkiom1fmhwcw0cvxaacapwjjugu489.png "/>


3. Domain-based virtual host

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/87/FB/wKioL1fmhYew3X0LAABNWsvde88802.png "title=" Yumingpeizhi.png "alt=" Wkiol1fmhyew3x0laabnwsvde88802.png "/>


Experimental Test diagram:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/87/FF/wKiom1fmhcuj8vNyAAB1U4dtkkY719.png "title=" Yumingwww.png "alt=" Wkiom1fmhcuj8vnyaab1u4dtkky719.png "/>


Web Service Small extension: Configure Status Page

1) Turn on the LoadModule status module

LoadModule Status_module modules/mod_status.so


2) Turn on Server-status and allow all hosts or a host to be dependent on the situation

<Location/server-status>

SetHandler Server-status

Order Allow,deny

Allow from all

</Location>


3) grammar test and its restart configuration file

Httpd-t

Service httpd Restart



Icon:


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/87/FB/wKioL1fmiDXh1r5nAABuxq0gkA8317.png "title=" Status1.png "alt=" Wkiol1fmidxh1r5naabuxq0gka8317.png "/>





Small ears original, a little progress every day, come on:)







This article is from the "Small Ears" blog, please be sure to keep this source http://purify.blog.51cto.com/10572011/1856265

Web Service httpd Virtual host configuration you made it?

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.