Accessing the HTTP server through domain name resolution

Source: Internet
Author: User
Tags purchase domain name sub domain subdomain

How do I access the specified server by the domain name I purchased? First, the domain name to pass the record.

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/8F/7E/wKiom1jg4pHStDpIAABEZRyvcxE610.png "title=" 1.png "alt=" Wkiom1jg4phstdpiaabezryvcxe610.png "/>


You can set the domain name's resolution (set sub-domain, bind public IP, etc.) on the URL of the purchase domain name.


650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/8F/7E/wKiom1jg4AWiCOD8AABw2J5M90k939.png "style=" float : none; "title=" 2.png "alt=" Wkiom1jg4awicod8aabw2j5m90k939.png "/>


The Apache version I used is 2.4.6, edit Apache config file: (# vim/etc/httpd/conf/httpd.conf)


The subdomain access server specifies the path:

<virtualhost *:80> documentroot "/www/html" ServerName www.512430.net</virtualhost>


The subdomain access server specifies the path:

<virtualhost *:80> documentroot "/www/html/blog/public" ServerName blog.512430.net</virtualhost>


Prohibit public IP access:

<virtualhost *:80> documentroot "/www/error" ServerName server public network IP rewriteengine on rewriterule ^.*/400.ph P</virtualhost>


To restart the Apache service:

# systemctl Restart Httpd.service


Test Sub domain: www.512430.net

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/8F/7E/wKiom1jg5UGTk5P1AADg28HFAFs698.png "style=" float : none; "title=" 3.png "alt=" Wkiom1jg5ugtk5p1aadg28hfafs698.png "/>


Test Sub domain: blog.512430.net

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/8F/7C/wKioL1jg5UHRlykBAABTDzMhBwY582.png "style=" float : none; "title=" 4.png "alt=" Wkiol1jg5uhrlykbaabtdzmhbwy582.png "/>


This article is from the "How Big Heart" blog, please be sure to keep this source http://qq512430.blog.51cto.com/5955081/1912593

Accessing the HTTP server through domain name resolution

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.