Two level domain name resolution settings and Apache subdomain configuration

Source: Internet
Author: User
Tags subdomain

Domain name management resolution items such as: Cy.wanggangg.top for wanggangg.top domain name add resolution host record set to CY record value for server IP address

Open Apache configuration file

Added as follows:
<virtualhost *:80>
ServerAdmin [email protected]
Documentroot/webdata/cy
ServerName Cy.wanggangg.top
Serveralias Cy.wanggangg.top
Errorlog "/var/log/httpd/cy.wanggangg.top-error.log"
Customlog "/var/log/httpd/cy.wanggangg.top.log" common
</VirtualHost>
The meaning of each parameter:
ServerAdmin Admin Mailbox

DocumentRoot pointing to the server subdirectory path

ServerName alias, you can set multiple aliases to point to the current directory, you can also do not fill in the alias

Errorlog Error Log save location

Customlog Access Log Save location

Restart Apache Service

Access the subdomain to verify that the resolution configuration is successful! (It is recommended to wait 10 minutes, the domain name resolution needs to take effect this time)

Two level domain name resolution settings and Apache subdomain configuration

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.