How to quickly build a static website on Alibaba Cloud

How to quickly build a static website on Alibaba Cloud

Preface:

As a junior programmer, I dream of building my own personal website and showing it to others. If you are just starting out, you can take a look at it. I suggest you publish your own static website to the server first.

Prepare:

1. Apply to register a server

Apply to register a cloud server, you can use Alibaba Cloud, Tencent Cloud, etc. Students can enjoy discounts when using the server~

2. Configure ftp\ssh environment

ps: What I know is that Alibaba Cloud has already configured ftp and ssh. If so, you can skip this step.

Specific steps:

To facilitate your later operations and use, you need to configure the ftp and ssh environment. (ftp: File Transfer Protocol, in layman's terms, it is uploading and downloading files; ssh: Secure Shell Protocol, a protocol designed to provide security for remote login sessions and other network services, allowing you to use other software to connect to your server).

FTP environment configuration solution link: https://www.jb51.net/article/156423.htm
SSH environment configuration solution link: https://www.jb51.net/article/156422.htm

3. Server-related remote connection software

When using our server, we need to connect remotely and upload files to the server. My two favorite software here are Xshell and Xftp.

Xshell: is a powerful secure terminal simulation software that supports SSH1, SSH2, and TELNET protocols on Microsoft Windows platforms. Xshell helps users enjoy their work in complex network environments with its secure connection to remote hosts through the Internet and its innovative design and features. That is, the console of the remote server.

Xftp: In simple terms, it means uploading and downloading server files.

4. Web application server related configuration

ps: I use tomcat here because I will put java related projects later. If it is other languages, you can find the corresponding web server. Here I mainly introduce the configuration process of tomcat.

4.1 Before configuring Tomcat, you need to configure the Java environment configuration.

Java environment configuration solution link: https://www.jb51.net/softjc/193398.html

4.2 Configure Tomcat

tomcat configuration solution link: https://www.jb51.net/article/108101.htm

5. Open the corresponding port

Open port to the outside world. I personally use port 80 or 8080.

To open the specified port for Alibaba Cloud Server, you need to take the following steps:

5.1 Find the security group configuration

5.2 Click Configure Rules

5.3 Click Add Security Group Rule

5.4 The port range format is 80/80. The authorized object can be viewed in "Teach me how to set up". The setting here is 0.0.0.0/0, which allows any object to access.

6. Create your own static website and wait for release.

For example, the following form:

7. Publish your own static website

7.1 Open Xftp and create a project folder under webapps in the tomcat directory under Linux. (My location is /usr/local/development/tomcat7/webapps, and a tree project was created)


7.2 Place this project in the folder you just created.


7.3 Restart tomcat.

8. Successfully access your own website

If you don't have a domain name for the time being, you can check the IP address of your server to access it and remember the port number of Tomcat you set. For example, my IP address is 180.20.123.30 and the port number is 8080. Then the http of the index page I want to access should be http://180.20.123.30:8080/tree/index.html .

It's done. Are you very happy? Go and show your results to your friends~

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

<<:  How to modify mysql to allow remote connections

>>:  Analyzing the four transaction isolation levels in MySQL through examples

Recommend

Detailed explanation of this pointing in JS arrow function

Arrow function is a new feature in ES6. It does n...

Steps to build a Docker image using Dockerfile

Dockerfile is a text file that contains instructi...

Docker Compose practice and summary

Docker Compose can realize the orchestration of D...

Two query methods when the MySQL query field type is json

The table structure is as follows: id varchar(32)...

How to use css overflow: hidden (overflow hiding and clearing floats)

Overflow Hide It means hiding text or image infor...

Detailed explanation of the 4 codes that turn the website black, white and gray

The 2008.5.12 Wenchuan earthquake in Sichuan took...

Five ways to achieve automatic page jump in HTML

In the previous article, we introduced three comm...

A Deeper Look at SQL Injection

1. What is SQL injection? Sql injection is an att...

Detailed explanation of how to enter and exit the Docker container

1 Start the Docker service First you need to know...

Web Design Tips: Simple Rules for Page Layout

Repetition: Repeat certain page design styles thr...

Vue+echarts realizes stacked bar chart

This article shares the specific code of Vue+echa...

Detailed example of how to implement transaction commit and rollback in mysql

Recently, we need to perform a scheduled migratio...

How to pass the value of the select drop-down box to the id to implement the code

The complete code is as follows : HTML code: Copy ...

Summary of 10 must-see JavaScript interview questions (recommended)

1.This points to 1. Who calls whom? example: func...