Reset instance password
Open Xshell to connect to the host
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
- start up
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.
If it is inaccessible, you need to go to the cloud server console to "add security group"
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