10 Questions
What is the URL that will be displayed on the browser when you access the static web example?
What is the next step after implementing Docker in the topic?
Post installation configuration of Nginx
What is the primary function of Nginx?
A web server that checks for what to serve from the configuration file
What command is used to check the configuration file path in Nginx?
nginx -V
How do you check the filesystem on Docker?
docker exec -it nginx-csc202-2022set/bin/bash
What is the essential configuration structure for specific HTTP servers or virtual hosts?
http { server { ... } }
What is the default path of the Nginx configuration file?
/etc/nginx/nginx.conf
What is the purpose of the server_name directive in Nginx configuration?
To specify the server name or domain name to serve
What is the benefit of using Docker in the topic?
Allows for easy installation and configuration of Nginx
What is the recommended manual for learning about Nginx configuration?
Manual-a webstack architecture primer on eLearning portal
Study Notes
Docker Compose and Nginx Overview
- Docker-compose.yml file is located in the root folder
- Nginx-primer folder contains various configuration files, including Dockerfile and static content
Running Docker Compose
- Run the command
docker-compose up
in the root terminal to start the service - If Nginx docker image is not available, it will be downloaded and built
Accessing Nginx
- Access Nginx through the URL http://localhost in a browser
- Add a fake domain name (e.g. csc2022.com) to the local nameserver by editing the hosts file
Development Tools
- VS Code IDE: https://code.visualstudio.com/download
- Docker: https://www.docker.com/products/docker-desktop
- Git for Windows: https://git-scm.com/download/win
- NodeJS: https://nodejs.org/en/download
- Expo Snack (online React Native test environment): https://snack.expo.dev
- Remix IDE (online IDE): https://remix.ethereum.org
- Hardhat: https://hardhat.org
Docker Compose Example
- Create a lesson project with a directory named CSC202-2022set
- Create two files: docker-compose.yml and csc2022.env
- Add content to docker-compose.yml, including version, services, and environment variables
Nginx Configuration
- Configuration file is by default located at /etc/nginx/nginx.conf
- Check the configuration file using the command
nginx -V
- Check the filesystem on docker using the command
docker exec -it nginx-csc202-2022set/bin/bash
- Configuration structure includes http and server blocks, with server_name specifying the domain name
Quiz about Docker compose configuration, including docker-compose.yml file, Dockerfile, and static content organization. Learn how to run Docker containers using the docker-compose command.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free