Install the text editor vim4, modify the Nginx configuration file 5, run Nginx6, verify website access 1.2. Apt-get update -y apt-get install nginx -y 3 Install vim apt-get install vim -y (CTRL + S will lock editing, CTRL + Q will remove) 4 Let’s create a nginx website, set the directory of the website to/MNT/WWW/HTML, Mkdir -p UI/WWW /index.html CD/UI/WWW/vim index.html CD /etc/nginx/sites-enabled/ ls vim default/UI/WWW/HTML 6. Switch to the root directory and type nginx ps -ef

Docker exec it{docker_name} /bin/bash

service endpoint with name xxx already exists. Solutions:

1. Stop all containers

docker stop $(docker ps -q)

2. Remove the container forcibly

docker rm -f mysql1

3. Clear the network usage of the container

Format: Docker network disconnect –force Network mode container name

Example: Docker network disconnect –force bridge mysqL1

4. Check if any containers with the same name are still occupied

Format: Docker Network Inspect Network mode Example: Docker Network Inspect Bridge

5. Rebuild the container

docker run –name mysql1 -d -p3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql:latest

The nginx directory does not have /sites-available or /sites-enabled vim /conf.d/default.conf


How does Linux view ports

lsof -i:8000

View the usage of all ports netstat-tunlp

Kill -9 {pid}

Enter the running docker container docker ps – a # to check the container id docker attach container id docker inspect CONTAINERID/CONTAINERNAME # for container information details