Use [Alibaba Cloud] server and [Xshell] to build your own [website]—— { }

Reset instance passwordinsert image description here

Open Xshell to connect to the host

insert image description here
insert image description here
insert image description here

Apache service

  • Install
    yum install httpd* -y
  • operate
    • start up
      systemctl start httpd.service
    • check status
      systemctl status httpd.service
    • stop
      systemctl stop httpd.service

At this time, open the public network IP of the cloud server in the browser and you can access it. If the following screen appears, it means success.

insert image description here

If it is inaccessible, you need to go to the cloud server console to "add security group"

insert image description here
insert image description here

Apache website configuration

  • Website Data Directory
    /var/www/html

Use an absolute path to enter the directory, Xshell enter the command: cd /var/www/html
put your index.html file here

test

  • Enter the command in the html directory: vim index.html
  • Press i to enter vim's input mode
  • Enter: Hello Linux
  • Press Esc to exit input mode
  • Enter the English colon:, enter wq, save and exit
  • Enter the public IP address in the browser
    insert image description here

Guess you like

Origin blog.csdn.net/weixin_43921423/article/details/121144276