Building a website from scratch-host

Source: Internet
Author: User
Tags ftp connection website server vps file transfer protocol filezilla filezilla host server hosting virtual private server
Building a website from scratch-hostBasic host knowledge

For websites, the significance of hosts is different from that of traditional PCs. Simply put, a host is the place where the website content is stored. It can be called "host space", "website server", and "host server. During routine site maintenance operations, the webmaster frequently performs host operations. A host in good running status is also the primary prerequisite for normal website operation.

The purchase of a host is mainly from an IDC service provider with relevant qualifications. The Internet Data Center (IDC) business has emerged along with the development of the Internet. Its function is to provide customers with data storage, data backup, data exchange, and other services by virtue of the rich it basic resources of IDCs and the highly centralized and standardized operation management system, customers can lease IDC services to build their own information systems. The largest IDC service providers in China include hichina and xinnet, while the most famous overseas providers include Godaddy, hostease, and ixwebhosting.

Generally, you can purchase domain names and hosts at the same time at the IDC service provider.

When purchasing hosts, we will find that the names and types of hosts are complex, and the prices of different hosts vary greatly. Therefore, you must first identify the host category so that you can select a host that is more suitable for your individual needs.

There are mainly the following types of hosts.

Ø Virtual Host: Also known as a virtual server, it refers to the use of virtual host technology to divide a server into multiple virtual servers, each VM has an independent domain name and a complete Internet server (supporting WWW, FTP, e-mail, and so on. Virtual Hosts are completely independent and can be managed by users. In terms of operations, each virtual host is exactly the same as an independent host. The parameters of a VM are generally specified by the IDC service provider in advance. Due to the hardware constraints of the server, the more VM users on a server, the more server resources the server is. Therefore, when purchasing a VM, the hardware configuration conditions become an important standard. Many people prefer to use hostease hosts outside China. Because of their high server configuration, the number of accounts hosted by each server is small, and the load is higher than that of other hosts. Because the price of virtual hosts is relatively low, it has become the first choice for many beginners and small and medium-sized sites, and is also the most widely used website host type.

VPs HOST: Virtual Private server (VPs) refers to the technology of dividing a server into multiple virtual independent private servers. Each VPS-based virtual independent server has an independent public IP address, operating system, hard disk space, memory space, CPU resources, etc, you can also install the system and program, and restart the server. The main difference between a VPs host and a virtual host is that it achieves the underlying isolation of the server hardware. Simply put, when other VPs hosts on the same server have a host or a failure, other VPs hosts are not affected. At the same time, because the VPs host has completely independent resources, its operation is more stable and efficient than that of the virtual host, so it is generally the first choice for upgrading virtual host users. American host machine lunarpages provides a good VPs host, specific access to the http://cn.lunarpages.com for information.

Ø independent host: A customer independently rents a server to display his website or provide services. Compared with virtual hosts, an independent host has the advantages of greater space, faster speed, and independent CPU computing. Of course, the price is also higher. Hostease also provides independent hosts, which can be viewed on its Chinese official website.

Cloud HOST: cloud host is a type of host that has emerged with the development of cloud computing in recent years. It is a virtualization technology similar to VPs host. VPs virtualizes multiple similar independent hosts on one server, while VM instances Virtualize multiple similar independent hosts on a group of cluster servers, each server in the cluster has an image of a VM instance, which greatly improves the security and stability of the VM instance. The VM instance cannot be accessed unless all the servers in the cluster have problems. It can be simply understood that a VM instance is actually a more secure variant of a VM instance. As cloud hosts have just emerged, their prices are also high.

Host hosting: it refers to hosting a server on its own. It is only placed in an IDC data center and remotely maintained by itself or other personnel, it mainly uses the environment and resources of the IDC room to ensure the normal operation of the server.

In addition to the above categories, the host operating system can be divided into Windows host and Linux host. According to the host location, it can be divided into domestic host, U.S. host, Hong Kong host, etc; based on the supported programming languages, PHP host, ASP host, JSP host, etc. For details, visit the US host detective Network (www.idcspy.org.

Host purchase

The purchase of a host is crucial to a site. A host with stable running status is a prerequisite for other operations on the website. Therefore, you must be cautious about the purchase of hosts, and make reasonable purchase based on the actual operation of the site.

When purchasing a host, consider the following factors.

Ø website program development language and running environment: the host stores website programs. Therefore, the first consideration when purchasing a host is whether the host can meet the needs of website programs. To put it simply, the development language is ASP or. NET. Generally, you can choose a host with a Windows operating system. The development language is Php or JSP. Generally, you can choose a host with a Linux or UNIX operating system. Further consideration should be given to the host's support for databases, database types, and database sizes.

The size of the website space: the size of the website space may be an indicator that many webmasters pay attention to when purchasing hosts for the first time. Many IDC service providers often emphasize this data to attract customers. In fact, the size of the space is mainly related to the content of the site. Except for images, videos, and other websites, the size of the space generally meets the daily needs of the site, you do not need to pursue this data too much.

Ø traffic size: when a user opens any page of the website, the traffic will be generated more or less. IDC service providers will limit the traffic due to balanced resource allocation. Therefore, when purchasing a host, you need to estimate the number of accesses to the site and the consumption of traffic to avoid being shut down by the IDC service provider or limiting the speed due to excessive traffic.

Ø number of links: the number of people who can open the website page after receiving an application at the same time. The number of links is directly related to the logon access level of the user's website on the VM. If the number of links is limited to too small, the number of users who can access the user's website at the same time will be limited, and the visitor wait time is too long, and so on. The number of IIS connections is usually limited on Windows hosts.

Ø host access speed: When purchasing a host, this indicator is valued by the webmaster, but there is generally no effective means to actually measure it, it can only be determined based on the level of the IDC service provider and the server location. Generally, if the site is intended for domestic users, you should select a domestic host. if most of the site visitors are foreign visitors, you can choose a foreign host. When selecting a host in China, you must note whether the host supports dual-line communication between China Telecom and China Netcom. If only one line is supported, this may cause users on another line to not be able to access the site smoothly.

Other ancillary functions: in addition to the factors mentioned above, other ancillary functions can be considered when purchasing a host to improve the convenience of using the host. For example, hosts that support the cpanel Panel have more powerful operation functions. hosts such as hostease and webhostingpad in foreign countries all provide the cpanel panel. hosts that support online FTP and decompression can upload files more conveniently; supports seamless host upgrade for a more convenient upgrade experience. Similarly, users who are keen to select the ixwebhosting host may be given an independent IP address, so they do not have to worry about being blocked due to the involvement of other websites.

Because hosts are affected by many factors such as website programs, geographic locations, and personal bandwidth during use, the service and quality of well-known IDC service providers are relatively guaranteed, you can give priority to their products at a reasonable price.

Host operations

Hosts are the storage space of website programs. The daily operations on hosts are deletion, modification, and backup of website program files. Most of these operations must be completed using FTP tools. In addition to file operations, other host operations, such as log viewing, domain name suspension, and database management, may need to be completed through a sophisticated host Management Panel.

The routine operations of a host can be divided into operations on the host Management Panel and FTP tools.

1. Host Management Panel

The host Management Panel, also known as the host management system, is the most intuitive management method for hosts, especially virtual hosts. It is a centralized and unified management platform that simplifies complex management tasks, integrates multiple services, improves management speed, reduces management costs, and makes host management more handy.

There are also many types of host management panels provided by various IDC service providers on the market. Different host management panels bring different user experiences to users. The good host Management Panel provides more freedom, more convenient settings, and more comprehensive functions during host usage.

This section describes the cpanel management panel with the highest market share in the host Management Panel. It is mainly used for Linux Hosts. It successfully overcomes the disadvantages of poor graphical interfaces of Linux operating systems and provides a very friendly and powerful interface.

For a webmaster, you can do the following through the cpanel Management Panel.

Upload, download, and edit webpage files.

Custom website error pages.

Create a large number of enterprise email accounts.

Create FTP accounts with different directory permissions for different users.

Install various CMS template website programs, such as discuz, WordPress, Drupal, ecshop, and shopex.

Ø back up your website data, Home Directory, MySQL database, and email forwarder.

Protect website directories and set anti-leech protection for website files.

Collects Website access data.

View error logs and analyze the causes of Website access errors.

Use phpMyAdmin to manage databases.

Ø use the Clock daemon job to easily perform scheduled tasks.

If a host provides cpanel panel management, its default logon address is generally http: // www.Site Domain Name: 2082 or http ://Host IP Address: 2082. If you use SSL encryption to log on, the address is generally https: // www.Site Domain Name: 2083 or https ://Host IP Address: 2083. The logon page is shown in 2-7.

Figure 2-7 cpanel panel logon page

The cpanel Management Panel provides excellent Chinese support services. You can log on by entering the user name and password (generally equivalent to the FTP account logon username and password provided by the IDC service provider, go to the welcome page of The cpanel panel from 2 to 8.

Figure 2-8 cpanel panel management page

It can be seen that the cpanel Management Panel briefly lists various host status information in the "stats" area on the left, at the same time, emails, files, domain names, databases, security, server logs, and other operations are listed on the right side for users to view and maintain their hosts.

For more information about cpanel Management Panel, refer to the cpanel China Regional Distributor wude Data website (http://www.idcvendor.com.

2. FTP Management Software

Most of the operations on the host are file-specific operations. It is too cumbersome to log on to the host Management Panel and then go to the file management module for management. Therefore, the FTP service for file management operations has become a conventional means for webmasters to manage host files.

File Transfer Protocol (FTP) is a set of standard protocols used for file transmission over the network, you only need to use the FTP software to log on to the host that activated the FTP service to complete file-related operations. Generally, the FTP service is activated on the host.

Common FTP software includes CuteFTP, flashfxp, and filezilla, which are both charged and free. You can choose to use them based on your needs. File Operations are basically the same for different FTP software. Here we only use filezilla as an example.

Open filezilla and the page shown in 2-9 is displayed.

Figure 2-9 filezilla

It can be seen that the software interface is mainly divided into two parts: the left side is mainly used to display files on the local computer. You can select the corresponding file location and display the files to be uploaded on the left side; when the server is not connected to the host on the right side, it is displayed as blank. When the connection is successful, the file content on the host is displayed.

If the host IP address of a website is 220.130.159.162, the FTP user name is "user", and the password is "user", you can use the site manager to create a site to connect to the host, 2-10.

After purchasing a host, the IDC service provider will inform you about the ftp-related information of the host. If you forget the information, contact our Customer Service staff. The default port is 21, which can be left empty.

Note: If a domain name is successfully bound to the host, you can enter the domain name address instead of the Host IP address to achieve FTP connection.

After the FTP connection is successful, the file content stored on the connected host is displayed on the FTP software interface, as shown in Figure 2-11.

Figure 2-10 filezilla new site connection

Figure 2-11 filezilla host content display

Figure 2-11 shows the file content of a virtual host, which contains several folders and configuration files. The daily file operations of the host are operations on these folders. The host file is described as follows.

The folder content of different hosts and configurations may be different. However, a VM generally contains two folders: "www" and "public_html. At the same time, strictly speaking, the "www" folder is only a shortcut for the "public_html" folder. The content displayed in the two folders is completely consistent.

All website programs upload program files to the "www" (or "public_html") folder. Therefore, without special instructions, the website "root directory" or "root path" refers to the "www" folder.

Ø when using FTP software to operate host files, you must back up the files in advance to prevent files from being recovered due to operation errors.

Most of the existing FTP software transmission modes are automatically selected, but File Upload errors may occur during the process of program upload. Therefore, many FTP software will see instructions for uploading in binary mode. For details about how to modify the transmission mode, refer to the steps shown in 2-12 in filezilla.

Figure 2-12 filezilla Transmission Mode settings

Many times, website security problems, such as Trojans, leeching, and database intrusion, are caused by the high permissions granted to some files on the host, using FTP software, you can easily modify the permissions of files or folders to prevent security risks caused by file permissions.

Find the file or folder on the host that requires permission modification, right-click the file, and select the "File Permission" option, as shown in Figure 2-13.

Figure 2-13 filezilla File Permission settings

In the file permission that appears, select the permission to be granted or directly enter the permission value, as shown in Figure 2-14.

Figure 2-14 modify filezilla File Permissions

For files in website programs, we should try to set file permissions according to system requirements, and minimize all permissions granted, that is, files with "777" permissions.

Host Security

You can search for thousands of questions about host security. As long as the website has a little traffic, such a host issue may occur-either today or tomorrow. Therefore, how to prevent host security has become a required course for every webmaster.

There are many precautions for host security prevention, from servers to programs, from passwords to permissions, from accounts to databases, which cannot be comprehensive, however, readers should pay attention to the following security measures.

Ø server security: This shows the security of website host configurations, such as operating system security and firewall security. Because the security settings of VM users are all set by the IDC service provider and users do not have permission to modify them, how is the server security performance of the IDC service provider an important standard to measure the host quality, this is also the advantage of large well-known IDC service providers. For independent hosts, especially server hosting users, if they do not have the corresponding server security knowledge, they need to learn more or directly entrust the server to professional management.

Ø website program security: This security may be the most exposed and easy to ignore by webmasters. When selecting a site-building program, we should try to select a well-known program to prevent malicious code from being compromised from the source. during download, we should also select the official site of the program or a well-known download site, prevent programs from being added to malicious code twice. Check program updates frequently, update program versions and install patches in a timely manner, and check the downloading and use of program plug-ins, it is best to select a plug-in with a large number of users to reject plug-ins with unknown access; keep the background account and database management account of the program; Regularly view the program management logon log to exclude unknown logins.

Ø pay attention to regular backup of website-related content: It is often said that "a hundred secrets" may cause site crashes at any time due to security issues or other problems that we did not pay attention to at any time, at this time, we need to develop a good habit of regular backup. When website-related information is lost, we can restore the site as soon as possible to minimize the loss.

 

 

 

 

This article is excerpted from the book website decryption: Learning Website Construction from scratch

Edited by webmaster's Encyclopedia

Published by Electronic Industry Publishing House

 

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.