Cainiao O & M notes: Configure Apache second-level domain name and WWW access, apache second-level domain name

Source: Internet
Author: User

Cainiao O & M notes: Configure Apache second-level domain name and WWW access, apache second-level domain name

In fact, www access is also a type of second-level domain name.

Modify the http. conf file

Add

<VirtualHost *:80>    ServerAdmin 879231132@qq.com    DocumentRoot /www/html/api/    ServerName java.unclewang.org</VirtualHost>

If you want to configure www access for your domain name, you only need to change java in the above step to www. The path is directed to the website root directory (the path that DocumentRoot points.

Caution 403

Note the root path. Must be inDocumentRootTo the directory. Otherwise, an error is reported during access.403 Forbidden You don't have permission to access / on this server.If you want to configure other paths, you need to change<Directory />But I feel so insecure.

Symbolic Link

Add a symbolic link to the external directory. For example, the webpage corresponding to my second-level domain name is placed in/www/api/Directory. And myDocumentRootYes/www/html/. In this case/www/htmlDirectory:

ln -s api /www/html/api
Configure DNSpod

Add a record to your domain name management page. For example, I want to add a second-level domain name starting with ** java.

Host records Record type Line Type Record Value MX priority TTL
Java A Default 104.131.149.55 - 600


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.