This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Nginx ### | |
| check process nginx | |
| with pidfile /run/nginx.pid | |
| start program = "/usr/sbin/service nginx start" | |
| stop program = "/usr/sbin/service nginx stop" | |
| if cpu > 60% for 2 cycles then alert | |
| if cpu > 80% for 5 cycles then restart | |
| if memory usage > 80% for 5 cycles then restart | |
| if failed host 157.245.66.174 port 80 protocol http | |
| then restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #app/config/unicorn/production.rb | |
| # paths | |
| app_path = "/home/deployer/qna" | |
| working_directory "#{app_path}/current" | |
| pid "#{app_path}/current/tmp/pids/unicorn.pid" | |
| # listen | |
| listen "#{app_path}/shared/tmp/sockets/unicorn.qna.sock", backlog: 64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #>>1. С помощью SQL (DDL): | |
| #Создайте базу данных test_guru | |
| postgres=# create database test_guru; | |
| CREATE DATABASE | |
| #Таблицу categories с атрибутом title | |
| test_guru=# CREATE TABLE categories ( | |
| test_guru=# id serial PRIMARY KEY, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Задание_Архитектура клиент-сервер и HTTP-протокол | |
| 1. Сформируйте и отправьте по указанному выше url: | |
| .................................................... | |
| 1.1 GET запрос без параметров | |
| .................................................... | |
| > ncat -C httpbin.org 80 | |
| GET / HTTP/1.1 | |
| Host:httpbin.org |
NewerOlder