├── .gitignore ├── README.md ├── generate-readme.php └── home ├── cloud └── gcp │ └── taskset │ ├── ReadMe.md │ ├── task-001-intro-console-projects-iam-apis │ └── ReadMe.md │ ├── task-002-getting-started-with-cloud-market-place--lamp-stack │ └── ReadMe.md │ ├── task-003-vpc-networking-and-google-compute-engine │ └── ReadMe.md │ ├── task-004-getting-started-with-cloud-storage-and-cloud-sql--php │ ├── ReadMe.md │ └── index.php │ ├── task-005-getting-started-with-gke--nginx │ └── ReadMe.md │ ├── task-006-hello-cloud-run--node │ ├── ReadMe.md │ └── hello-world-node │ │ ├── Dockerfile │ │ ├── index.js │ │ └── package.json │ ├── task-007-building-a-devops-pipeline--python │ ├── .images │ │ └── devops-pipeline.png │ ├── Dockerfile │ ├── ReadMe.md │ ├── main.py │ ├── requirements.txt │ └── templates │ │ ├── index.html │ │ └── layout.html │ ├── task-008-deploying-app-to-app-engine-and-gke-and-cloudrun--python │ ├── .images │ │ └── arch-objective.png │ ├── Dockerfile │ ├── ReadMe.md │ ├── app.yaml │ ├── k8s-manifests.yaml │ ├── main.py │ ├── requirements.txt │ └── templates │ │ ├── index.html │ │ └── layout.html │ ├── task-009-monitoring-applications-in-gcp--python │ ├── Dockerfile │ ├── ReadMe.md │ ├── app.yaml │ ├── main.py │ ├── requirements.txt │ └── templates │ │ ├── index.html │ │ └── layout.html │ ├── task-010-alerting-in-google-cloud--python │ ├── Dockerfile │ ├── ReadMe.md │ ├── app-engine-error-percent-policy.json │ ├── app.yaml │ ├── main.py │ ├── requirements.txt │ └── templates │ │ ├── index.html │ │ └── layout.html │ ├── task-011-service-monitoring--node │ └── ReadMe.md │ ├── task-012-monitoring-and-dashboarding-multiple-projects-from-a-single-workspace--nginx │ └── ReadMe.md │ ├── task-013-compute-logging-and-monitoring │ └── ReadMe.md │ ├── task-014-log-analysis-cloud-run--node │ └── ReadMe.md │ ├── task-015-cloud-storage-audit-logs │ └── ReadMe.md │ ├── task-016-analyzing-network-traffic-with-vpc-flow-logs │ └── ReadMe.md │ ├── task-017-application-performance-management--python-and-nodejs │ └── ReadMe.md │ ├── task-018-2inst-2buckets-2iam │ └── ReadMe.md │ ├── task-019-working-with-cloud-build │ └── ReadMe.md │ ├── task-020-deploying-google-kubernetes-engine │ └── ReadMe.md │ ├── task-021-creating-google-kubernetes-engine-deployments │ ├── ReadMe.md │ ├── nginx-canary.yaml │ ├── nginx-deployment.yaml │ ├── nginx-svc-session-affinity.yaml │ └── service-nginx.yaml │ ├── task-022-configuring-persistent-storage-for-google-kubernetes-engine │ ├── ReadMe.md │ ├── pod-volume-demo.yaml │ ├── pvc-demo.yaml │ └── statefulset-demo.yaml │ ├── task-023-anthos-service-mesh-walkthrough │ ├── .images │ │ ├── arch-img.png │ │ ├── security.png │ │ └── topology.png │ └── ReadMe.md │ ├── task-024-observing-anthos-services │ └── ReadMe.md │ ├── task-025-managing-traffic-with-anthos-service-mesh │ ├── .images │ │ ├── img.png │ │ └── img2.png │ ├── ReadMe.md │ ├── conditional-routing-labels.yaml │ ├── conditional-routing-req-headers.yaml │ ├── fault-injection-aborts.yaml │ ├── fault-injection-delays.yaml │ ├── manifests │ │ ├── destinationrule--productpage-circuit-breaker.yaml │ │ ├── destinationrule-all.yaml │ │ ├── gateway--bookinfo-gateway-port-80-http.yaml │ │ ├── virtualService-2-or-1-second-delay-to-calls-to-ratings-service.yaml │ │ ├── virtualservice--all-to-v1.yaml │ │ ├── virtualservice--bookinfo-based-on-exact-and-prefix-uri-match.yaml │ │ ├── virtualservice--half-second-timeout-for-calls-to-reviews.yaml │ │ ├── virtualservice--productpage-per-try-timeout-2s.yaml │ │ ├── virtualservice--reviews-v2-based-on-header.yaml │ │ ├── virtualservice--reviews-v3.yaml │ │ ├── virtualservice--route-req-to-v2-reviews.yaml │ │ └── virtualservice-reviews-50-v3-and-50-v1.yaml │ ├── retry.yaml │ ├── timeouts.yaml │ └── traffic-splitting.yaml │ ├── task-026-securing-traffic-through-anthos-service-mesh │ ├── .images │ │ ├── mTLS-initial-setup.png │ │ └── mTLS-strict-mode.png │ ├── PeerAuthentication--mesh-wide-mtls.yaml │ ├── PeerAuthentication--restricted-mtls.yaml │ ├── ReadMe.md │ └── manifests │ │ ├── AuthorizationPolicy--require-jwt-v2.yaml │ │ ├── AuthorizationPolicy--require-jwt.yaml │ │ ├── RequestAuthentication--jwt-example.yaml │ │ ├── httpbin.yaml │ │ └── sleep.yaml │ ├── task-027-cloud-source-repositories-overview │ └── ReadMe.md │ ├── task-028-managing-deployments-using-kubernetes-engine │ ├── .images │ │ ├── blue-green-deployments.png │ │ ├── canary-deployments.png │ │ └── rolling-update.png │ ├── ReadMe.md │ ├── cleanup.sh │ ├── deployments │ │ ├── auth.yaml │ │ ├── frontend.yaml │ │ ├── hello-canary.yaml │ │ ├── hello-green.yaml │ │ └── hello.yaml │ ├── nginx │ │ ├── frontend.conf │ │ └── proxy.conf │ ├── pods │ │ ├── healthy-monolith.yaml │ │ ├── monolith.yaml │ │ └── secure-monolith.yaml │ └── services │ │ ├── auth.yaml │ │ ├── frontend.yaml │ │ ├── hello-blue.yaml │ │ ├── hello-green.yaml │ │ ├── hello.yaml │ │ └── monolith.yaml │ ├── task-029-trouble-shooting-workloads-on-gke-for-sre │ └── ReadMe.md │ ├── task-030-minimal-nodejs-app-dockerize-google-artifact-registry │ ├── ReadMe.md │ └── test │ │ ├── Dockerfile │ │ └── app.js │ ├── task-031-hello-node-kubernetes--node │ ├── .images │ │ ├── moving-parts.png │ │ └── state-of-cluster.png │ ├── Dockerfile │ ├── ReadMe.md │ └── server.js │ ├── task-032-setting-up-jenkins-on-kubernetes-engine │ ├── ReadMe.md │ └── values.yaml │ └── task-033-continuous-delivery-with-jenkins-in-kubernetes-engine │ ├── Jenkinsfile │ ├── ReadMe.md │ └── values.yaml ├── containers ├── ReadMe.md ├── task-001-docker-overview │ └── ReadMe.md ├── task-002-docker-run--detached-vs-foreground │ └── ReadMe.md ├── task-003-docker-run--assign-name-and-allocate-pseudo-tty │ └── ReadMe.md ├── task-004-docker-run--pid-setting-and-choosing-image-with-tag │ └── ReadMe.md ├── task-005-docker-run--expose-port-and-pull-policy-and-environment-vars │ ├── .env │ ├── .images │ │ └── nginx.png │ └── ReadMe.md ├── task-006-docker-run--full-container-capabilities-and-set-working-dir-and-volume-mounts │ └── ReadMe.md ├── task-007-docker-run--metadata-and-network-and-attach-to-stdout │ └── ReadMe.md ├── task-008-docker-run--hostsfile-ulimit-mem-limit │ └── ReadMe.md ├── task-009-docker-attach │ └── ReadMe.md ├── task-010-docker-build │ ├── Dockerfile │ ├── ReadMe.md │ └── index.html └── task-011-docker-commit │ └── ReadMe.md ├── infrastructure-as-code └── terraform-gcp │ ├── ReadMe.md │ ├── taskset │ ├── task-001-vpc-2inst-cloudshell │ │ ├── .images │ │ │ └── infra-diagram.png │ │ ├── ReadMe.md │ │ ├── instance │ │ │ ├── main.tf │ │ │ └── variables.tf │ │ ├── mynetwork.tf │ │ └── provider.tf │ ├── task-002-1inst-dflt-vpc │ │ ├── ReadMe.md │ │ └── main.tf │ ├── task-003-vars-and-resource-dependencies │ │ ├── ReadMe.md │ │ ├── exp.tf │ │ ├── instance.tf │ │ ├── outputs.tf │ │ ├── provider.tf │ │ └── variables.tf │ ├── task-004-creating-remote-backend │ │ ├── ReadMe.md │ │ └── main.tf │ ├── task-005-deploy-k8s-loadbalancer-service │ │ ├── ReadMe.md │ │ ├── k8s.tf │ │ ├── main.tf │ │ ├── test.sh │ │ └── versions.tf │ ├── task-006-modular-load-balancing-regional-load-balancer │ │ ├── .images │ │ │ ├── app-with--basic-load-balancer-default.png │ │ │ ├── basic-load-balancer-custom-hc-hc.png │ │ │ ├── basic-load-balancer-default-hc-firewall-rule.png │ │ │ ├── basic-load-balancer-default.png │ │ │ ├── cloud-nat-details.png │ │ │ ├── cloud-nat.png │ │ │ ├── cloud-router-details.png │ │ │ ├── cloud-router.png │ │ │ ├── firewall-rules.png │ │ │ ├── forwarding-rules.png │ │ │ ├── health-checks.png │ │ │ ├── instance-template-details.png │ │ │ ├── instance-template.png │ │ │ ├── load-balancers.png │ │ │ ├── mig-details.png │ │ │ ├── mig.png │ │ │ ├── service-account.png │ │ │ ├── target-pools.png │ │ │ ├── vm-instances.png │ │ │ ├── vpc-networks.png │ │ │ └── vpc-subnetworks.png │ │ ├── ReadMe.md │ │ ├── apply.log │ │ ├── main.tf │ │ ├── outputs.tf │ │ ├── terraform-google-lb │ │ │ └── examples │ │ │ │ └── basic │ │ │ │ ├── docs │ │ │ │ └── diagram.png │ │ │ │ ├── locals.tf │ │ │ │ ├── main.tf │ │ │ │ ├── network.tf │ │ │ │ ├── outputs.tf │ │ │ │ ├── provider.tf │ │ │ │ ├── templates │ │ │ │ └── gceme.sh.tpl │ │ │ │ ├── variables.tf │ │ │ │ └── versions.tf │ │ ├── variables.tf │ │ └── versions.tf │ ├── task-007-cloud-sql │ │ ├── .images │ │ │ └── cloud-sql-proxy-workings.png │ │ ├── ReadMe.md │ │ ├── main.tf │ │ ├── outputs.tf │ │ └── variables.tf │ └── task-008-building-a-vpn-between-gcp-and-aws │ │ ├── .images │ │ ├── aws-compute.png │ │ ├── aws-customer-gatways.png │ │ ├── aws-intenet-gatway.png │ │ ├── aws-subnets.png │ │ ├── aws-virtual-private-gateway-gatway.png │ │ ├── aws-vpc.png │ │ ├── aws-vpn-connections.png │ │ ├── gcp-cloud-firewall.png │ │ ├── gcp-cloud-ip-addresses.png │ │ ├── gcp-cloud-router-details.png │ │ ├── gcp-cloud-router.png │ │ ├── gcp-cloud-routes.png │ │ ├── gcp-cloud-vpn-gatways.png │ │ ├── gcp-cloud-vpn-tunnels.png │ │ ├── gcp-compute.png │ │ ├── gcp-network.png │ │ └── gcp-peer-vpn-gatway.png │ │ ├── ReadMe.md │ │ └── autonetdeploy-multicloudvpn │ │ ├── aws_set_credentials.sh │ │ ├── create_instance.sh │ │ ├── gcp_set_credentials.sh │ │ ├── gcp_set_project.sh │ │ ├── get_terraform.sh │ │ ├── images │ │ └── autonetdeploy_gcpawsvpn_arch.png │ │ ├── migrate_sa_roles.sh │ │ └── terraform │ │ ├── aws_compute.tf │ │ ├── aws_networking.tf │ │ ├── aws_outputs.tf │ │ ├── aws_security.tf │ │ ├── aws_variables.tf │ │ ├── gcp_compute.tf │ │ ├── gcp_networking.tf │ │ ├── gcp_outputs.tf │ │ ├── gcp_security.tf │ │ ├── gcp_variables.tf │ │ ├── main.tf │ │ ├── run_graph.sh │ │ └── vm_userdata.sh │ └── update-readme.php └── web-servers └── nginx ├── ReadMe.md ├── task-001-run-nginx ├── 50x.html ├── ReadMe.md ├── default.conf └── index.html └── task-002-nginx-conf ├── ReadMe.md ├── conf.d └── default.conf └── html ├── 50x.html └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .tmp 3 | 4 | venv 5 | 6 | tmpdir 7 | 8 | 9 | ## All pem files 10 | *.pem -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | - [home](#home) 2 | - [cloud](#cloud) 3 | - [gcp](#gcp) 4 | - [containers](#containers) 5 | - [infrastructure-as-code](#infrastructure-as-code) 6 | - [terraform-gcp](#terraform-gcp) 7 | - [web-servers](#web-servers) 8 | - [nginx](#nginx) 9 | 10 | 11 | # home 12 | | No of Tasks | | 13 | |---------|--------------------------------------------| 14 | | 0| ./home| 15 | 16 | ## cloud 17 | | No of Tasks | | 18 | |---------|--------------------------------------------| 19 | | 0| ./home/cloud| 20 | 21 | ### gcp 22 | | No of Tasks | | 23 | |---------|--------------------------------------------| 24 | | 26| ./home/cloud/gcp| 25 | 26 | ## containers 27 | | No of Tasks | | 28 | |---------|--------------------------------------------| 29 | | 10| ./home/containers| 30 | 31 | ## infrastructure-as-code 32 | | No of Tasks | | 33 | |---------|--------------------------------------------| 34 | | 0| ./home/infrastructure-as-code| 35 | 36 | ### terraform-gcp 37 | | No of Tasks | | 38 | |---------|--------------------------------------------| 39 | | 1| ./home/infrastructure-as-code/terraform-gcp| 40 | 41 | ## web-servers 42 | | No of Tasks | | 43 | |---------|--------------------------------------------| 44 | | 0| ./home/web-servers| 45 | 46 | ### nginx 47 | | No of Tasks | | 48 | |---------|--------------------------------------------| 49 | | 2| ./home/web-servers/nginx| 50 | -------------------------------------------------------------------------------- /home/cloud/gcp/taskset/task-001-intro-console-projects-iam-apis/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Get Familiar With Console, Projects, Roles And Permissions, APIs And Services 2 | 3 | 4 | [https://www.cloudskillsboost.google](https://www.cloudskillsboost.google) 5 | 6 | [Select - DevOps Engineer, SRE Learning Path](https://www.cloudskillsboost.google/paths) 7 | 8 | **High Level Objectives** 9 | - Searching though available products and services in the GCP console. 10 | - Accessing projects in console. 11 | - Accessing roles and permissions in console i.e. Identify and Access Management 12 | - Enable specific API for any product 13 | 14 | 15 | 16 | **Skills** 17 | - gcp 18 | - gcp-console 19 | - gcp-projects 20 | - gcp-iam 21 | - gcp-apis 22 | 23 | 24 | 25 | > Task : Searching through the available products and services 26 | 27 | ## Project 28 | 29 | 30 | - A Google Cloud [project](https://cloud.google.com/docs/overview/#projects) is an organizing entity for your Google Cloud resources. It often contains resources and services. 31 | - Your project has a name, number, and ID 32 | 33 | > Task : How do we see all the projects 34 | 35 | ## Roles and permissions 36 | 37 | [IAM Overview](https://cloud.google.com/iam/docs/overview) 38 | [course_sessions/2028816/video/343130](https://www.cloudskillsboost.google/course_sessions/2028816/video/343130) 39 | 40 | - Google Cloud also contains a collection of permissions and roles that define who has access to what resources 41 | - You can use the [CloudIAM](https://cloud.google.com/iam/) console for the same. 42 | 43 | > Task : How do we navigate to CloudIAM console 44 | 45 | 46 | ## APIs And Services 47 | 48 | - When you create your own Google Cloud projects outside of the lab environment, you will have to enable APIs yourself. 49 | 50 | > Task : Enable the Dialogflow API 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /home/cloud/gcp/taskset/task-002-getting-started-with-cloud-market-place--lamp-stack/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Getting Started With Cloud Marketplace 2 | 3 | [https://www.cloudskillsboost.google](https://www.cloudskillsboost.google) 4 | 5 | [Select - DevOps Engineer, SRE Learning Path](https://www.cloudskillsboost.google/paths) 6 | 7 | **High Level Objectives** 8 | - To launch a LAMP stack from GCP marketplace 9 | - Validate the changes by going to the public endpoint created 10 | 11 | 12 | 13 | **Skills** 14 | - gcp 15 | - cloud-marketplace 16 | 17 | 18 | 19 | 20 | 21 | > Task : We will use the Cloud MarketPlace to deploy a LAMP stack 22 | 23 | ## High Level Tasks 24 | 25 | - Search for "LAMP Packaged by Bitnami" in the Marketplace 26 | - Launch 27 | - You should see the status as deployed as it is completed 28 | - Go to the site address 29 | - SSH 30 | - In the created SSH window 31 | 32 | ```bash 33 | cd /opt/bitnami 34 | 35 | sudo sh -c 'echo "" > apache2/htdocs/phpinfo.php' 36 | ``` 37 | 38 | - Open the `SITE_ADDRESS` again to view your changes -------------------------------------------------------------------------------- /home/cloud/gcp/taskset/task-004-getting-started-with-cloud-storage-and-cloud-sql--php/index.php: -------------------------------------------------------------------------------- 1 | 2 |
Welcome to my Docker container!
8 | 9 | 10 | -------------------------------------------------------------------------------- /home/infrastructure-as-code/terraform-gcp/taskset/task-001-vpc-2inst-cloudshell/.images/infra-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecloudterminal01/learn-devops/d6cc45268dd93258ffc70c253e28ec44fcfbd541/home/infrastructure-as-code/terraform-gcp/taskset/task-001-vpc-2inst-cloudshell/.images/infra-diagram.png -------------------------------------------------------------------------------- /home/infrastructure-as-code/terraform-gcp/taskset/task-001-vpc-2inst-cloudshell/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Using Terraform in GCP console 2 | 3 | **High Level Objectives** 4 | 5 | - Create a VPC network 6 | - Attached Internet Gateway 7 | - Instances in 2 regions with subnets created using auto-mode 8 | 9 | **Skills** 10 | - VPC 11 | - Internet Gateway 12 | - instances 13 | - subnets using auto-mode 14 | - terraform 15 | 16 | **Version Stack** 17 | 18 | | Stack | Version | 19 | |-----------|---------| 20 | | Terraform | 1.3.4 | 21 | 22 | 23 |  24 | 25 | 26 | - Let's go through the code together 27 | 28 | - Begin 29 | 30 | ```bash 31 | terraform --version 32 | ``` 33 | 34 | - Create the required files 35 | 36 | ```bash 37 | terraform init 38 | 39 | terraform plan 40 | 41 | terraform apply 42 | ``` 43 | 44 | - View the resources created on the console 45 | 46 | - SSH into the instance 47 | 48 | ```bash 49 | ping google.com # So we have internet access 50 | 51 | ## SSH into one instance and 52 | 53 | pingSorry, the page you are looking for is currently unavailable.
14 | Please try again later.
If you are the system administrator of this resource then you should check 16 | the error log for details.
17 |Faithfully yours, nginx.
18 | 19 | 20 | -------------------------------------------------------------------------------- /home/web-servers/nginx/task-001-run-nginx/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Run Nginx on local 2 | 3 | - [docs.docker.com/samples/nginx](https://docs.docker.com/samples/nginx) 4 | - [docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-docker](https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-docker) 5 | - [hub.docker.com/_/nginx](https://hub.docker.com/_/nginx) 6 | 7 | **High Level Objectives** 8 | - Running nginx on local using docker run 9 | - Exploring files /etc/nginx/conf.d/default.conf,/usr/share/nginx/html index.html and 50x.html 10 | - Copy the files to local directory 11 | 12 | **Skills** 13 | - nginx 14 | - docker 15 | - default.conf 16 | 17 | 18 | **Version Stack** 19 | 20 | | Stack | Version | 21 | |-------|--------------| 22 | | nginx | nginx/1.23.2 | 23 | 24 | 25 | ### Running nginx using docker and access on port 80 of host 26 | 27 | ```bash 28 | ❯ docker run -it --rm -d -p 8080:80 --name nginx nginx 29 | 92268273c3173345ac4a00a480cc05971de55bd5280b85b03e0968af4e600e9e 30 | 31 | ❯ docker ps -a 32 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 33 | 92268273c317 nginx "/docker-entrypoint.…" 22 seconds ago Up 21 seconds 0.0.0.0:8080->80/tcp nginx 34 | ``` 35 | 36 | Accessing on [http://localhost:8080](http://localhost:8080) 37 | 38 | ```bash 39 | ❯ curl -s -o /dev/null localhost:8080 -I -w "%{http_code}" 40 | 200 41 | ``` 42 | 43 | ## Exploring the files 44 | 45 | ```bash 46 | ❯ docker exec -it nginx bash 47 | root@92268273c317:/# ls /etc/nginx/conf.d/ 48 | default.conf 49 | root@92268273c317:/# ls /usr/share/nginx/html 50 | 50x.html index.html 51 | root@92268273c317:/# exit 52 | ❯ 53 | ``` 54 | 55 | ## Copy the files to local 56 | 57 | ```bash 58 | ❯ docker cp nginx:/usr/share/nginx/html/50x.html 50x.html 59 | ❯ docker cp nginx:/usr/share/nginx/html/index.html index.html 60 | ❯ docker cp nginx:/etc/nginx/conf.d/default.conf default.conf 61 | ❯ ls 62 | 50x.html ReadMe.md default.conf index.html 63 | ``` 64 | 65 | -------------------------------------------------------------------------------- /home/web-servers/nginx/task-001-run-nginx/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | listen [::]:80; 4 | server_name localhost; 5 | 6 | #access_log /var/log/nginx/host.access.log main; 7 | 8 | location / { 9 | root /usr/share/nginx/html; 10 | index index.html index.htm; 11 | } 12 | 13 | #error_page 404 /404.html; 14 | 15 | # redirect server error pages to the static page /50x.html 16 | # 17 | error_page 500 502 503 504 /50x.html; 18 | location = /50x.html { 19 | root /usr/share/nginx/html; 20 | } 21 | 22 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 23 | # 24 | #location ~ \.php$ { 25 | # proxy_pass http://127.0.0.1; 26 | #} 27 | 28 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 29 | # 30 | #location ~ \.php$ { 31 | # root html; 32 | # fastcgi_pass 127.0.0.1:9000; 33 | # fastcgi_index index.php; 34 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 35 | # include fastcgi_params; 36 | #} 37 | 38 | # deny access to .htaccess files, if Apache's document root 39 | # concurs with nginx's one 40 | # 41 | #location ~ /\.ht { 42 | # deny all; 43 | #} 44 | } 45 | 46 | -------------------------------------------------------------------------------- /home/web-servers/nginx/task-001-run-nginx/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |If you see this page, the nginx web server is successfully installed and 14 | working. Further configuration is required.
15 | 16 |For online documentation and support please refer to
17 | nginx.org.
18 | Commercial support is available at
19 | nginx.com.
Thank you for using nginx.
22 | 23 | 24 | -------------------------------------------------------------------------------- /home/web-servers/nginx/task-002-nginx-conf/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | # This block defines the main server configuration. 2 | server { 3 | # It specifies that the server will listen on port 80, 4 | listen 80; 5 | # accept IPv6 connections 6 | listen [::]:80; 7 | # and have a server name of "localhost". 8 | server_name localhost; 9 | 10 | # This block defines the configuration for access logging. It specifies the location of the access log file and the log format. 11 | access_log /var/log/nginx/host.access.log main; 12 | 13 | # This block defines the configuration for the root location. 14 | # It specifies that any request to the root URL ("/") should be served from the "/usr/share/nginx/html" 15 | # directory and that the server should look for "index.html" or "index.htm" files in that directory. 16 | location / { 17 | root /usr/share/nginx/html; 18 | index index.html index.htm; 19 | } 20 | 21 | # This block defines the configuration for the 404 error page. 22 | # It specifies that the server should look for the "/usr/share/nginx/html/404.html" file when it encounters a 404 error. 23 | #error_page 404 /404.html; 24 | 25 | # redirect server error pages to the static page /50x.html 26 | # 27 | # This block defines the error pages that will be displayed when the server encounters certain errors. 28 | # In this case, if the server encounters a 500, 502, 503, or 504 error, it will display the "/usr/share/nginx/html/50x.html" file. 29 | error_page 500 502 503 504 /50x.html; 30 | 31 | # This block defines the configuration for the "/50x.html" URL. 32 | # It specifies that the server should look for the file in the "/usr/share/nginx/html" directory. 33 | location = /50x.html { 34 | root /usr/share/nginx/html; 35 | } 36 | 37 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 38 | # 39 | # This block provides an example of how to proxy PHP scripts to an Apache server listening on localhost:80. 40 | #location ~ \.php$ { 41 | # proxy_pass http://127.0.0.1; 42 | #} 43 | location /proxyme { 44 | proxy_pass http://localhost:1337/index.html; 45 | } 46 | 47 | 48 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 49 | # 50 | # This block provides an example of how to pass PHP scripts to a FastCGI server listening on localhost:9000. 51 | # It also specifies the location of the FastCGI server, the FastCGI index file, and the FastCGI parameters. 52 | #location ~ \.php$ { 53 | # root html; 54 | # fastcgi_pass 127.0.0.1:9000; 55 | # fastcgi_index index.php; 56 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 57 | # include fastcgi_params; 58 | #} 59 | 60 | # deny access to .htaccess files, if Apache's document root 61 | # concurs with nginx's one 62 | # 63 | # This block provides an example of how to deny access to .htaccess files. 64 | # It specifies that any request that starts with a "." followed by "ht" (i.e., a request for a .htaccess file) should be denied access. 65 | #location ~ /\.ht { 66 | # deny all; 67 | #} 68 | location /denyme { 69 | deny all; 70 | } 71 | } -------------------------------------------------------------------------------- /home/web-servers/nginx/task-002-nginx-conf/html/50x.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |Sorry, the page you are looking for is currently unavailable.
14 | Please try again later.
If you are the system administrator of this resource then you should check 16 | the error log for details.
17 |Faithfully yours, nginx.
18 | 19 | 20 | -------------------------------------------------------------------------------- /home/web-servers/nginx/task-002-nginx-conf/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |This nginx page is brought to you by Docker
9 |