Getting Started Tutorial for Beginners ④: How to bind subdirectories

Getting Started Tutorial for Beginners ④: How to bind subdirectories
To understand what this means, we must first know what a subdirectory is. So what is a subdirectory? In fact, the subdirectory is relative to the root directory of your website. Use FTP software to log in to the space. You will first see three folders, as shown below:

The first "log" folder in the above picture is used to store website logs, such as search engine visit logs, website operation logs, etc. Some virtual hosts provide log viewing function, so there will be log files in it, and some spaces do not support log viewing, so it will be empty; the second "private_data" folder is generally used to store website data. For general personal webmasters, this folder does not need to be used and is rarely used; and the last "public_html" folder is the most important, which is what we call the website root directory. Due to different providers, the root directory in some places will be named "wwwroot", "web", etc.

No matter what it is named, you can generally tell at a glance that any directory with a meaning similar to web, html, www, root, etc. is the root directory. All website files must be uploaded to the root directory. If uploaded to other folders, the website will not be able to be opened.

Now that you know the root directory, a subdirectory, as the name implies, is a directory above the root directory, which means that all folders on the root directory are subdirectories. Therefore, binding a subdirectory means binding the domain name to any folder on the root directory, making this folder an independent site. If a space supports one sub-directory, it means that the root directory can be used as a website, and the sub-directory can also be used as a website, which means that one space can be used to create two independent websites; if it supports two sub-directories, it can be used to create three websites...

Here's how to bind a directory:

1) First, create a folder in the root directory. The folder name will be used when binding, and store the file contents of the sub-directory website to be bound in this directory.

2) Log in to the management center (control panel), and select: Self-service management - host management - operation management - [subdirectory binding], as shown in Figure 1:

3) Bind domain name: Enter the domain name you want to access this directory (this domain name must be resolved to this server), such as bbs.abc.com; Subdirectory name: Enter the subdirectory folder name created in step 1), as shown in Figure 2;

Note: The subdirectory you want to bind must be created using FTP first, otherwise it will not be able to be bound!

4) Next, click "Specify the resources available for this directory". The total resources are calculated as 100% and resources are allocated to this directory. The specific allocation amount can be set according to your own needs, as shown in Figure 3.

At this point, the binding subdirectory is complete. As long as the domain name is resolved to the host, the website can be opened. The resolution method is the same as resolving to the root directory, so I will not explain it here. If you don’t know how to resolve it, please read the previous article.

What are the advantages and disadvantages of binding subdirectories?

1) The space size is shared with the main website. Before the total space is used up, it is unlimited and easy to manage.

2) The number of IIS links is distributed proportionally among the bound websites.

3) If a bandwidth limit is set, the bandwidth is also distributed proportionally among the bound websites.

4) The websites bound to the sub-directories all share an application pool with the main website. For example, the total resources of a certain site are as follows: limit 1M per second, IIS limit 100; now bind a subdirectory, and allocate 40% of the resources to the subdirectory, then the situation after allocation is: the total directory is limited to 600K per second, IIS is 60, the subdirectory is limited to 400K per second, IIS is 40; so the allocation of resources should be adjusted reasonably according to the traffic of each site; otherwise the site will be slower, and if too many subdirectories are bound, the site will also be very slow.

That’s all for today. If you have any questions or different opinions, please feel free to post a comment or leave a message on my blog.

I have a domain name and space. Do I need to apply for any certification before opening the website? Preview of the next post: I will reveal the secrets of filing for you, so that you can file quickly yourself.

<<:  Solution to invalid margin-top of elements in div tags

>>:  Detailed explanation of Vue monitoring attribute graphic example

Recommend

VPS builds offline download server (post-network disk era)

motivation Due to learning needs, I purchased a v...

Commonly used JavaScript array methods

Table of contents 1. filter() 2. forEach() 3. som...

How to set up Spring Boot using Docker layered packaging

The Spring Boot project uses docker containers, j...

Solution to the failure of 6ull to load the Linux driver module

Table of contents 0x01 Failed to load the driver ...

Issues with upgrading Python and installing Mongodb drivers under Centos

Check the Python version python -V If it is below...

Summary of MySql index, lock, and transaction knowledge points

This article summarizes the knowledge points of M...

Vue realizes the percentage bar effect

This article shares the specific code of Vue to r...

Detailed example of HTML element blocking Flash

Copy code The code is as follows: wmode parameter...

React error boundary component processing

This is the content of React 16. It is not the la...

How to query and update the same table in MySQL database at the same time

In ordinary projects, I often encounter this prob...

MySQL 5.6.23 Installation and Configuration Environment Variables Tutorial

This article shares the installation and configur...

Simple tutorial on using Navicat For MySQL

recommend: Navicat for MySQL 15 Registration and ...

An article to deal with Mysql date and time functions

Table of contents Preface 1. Get the current time...