FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
middleware:nginx:index.html [2017/12/30 15:47] kurihara [Configuration] |
middleware:nginx:index.html [2019/02/11 00:45] (current) kurihara |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== Nginx (nginx.py) ====== | ====== Nginx (nginx.py) ====== | ||
| - | \\ | + | $FHHOME/ |
| {{INLINETOC}} | {{INLINETOC}} | ||
| \\ | \\ | ||
| Line 11: | Line 12: | ||
| <sxh bash toolbar: | <sxh bash toolbar: | ||
| $ fab -l |grep nginx | $ fab -l |grep nginx | ||
| + | </ | ||
| + | <sxh bash toolbar: | ||
| $ H=test-server-1, | $ H=test-server-1, | ||
| - | $ fab -H $H auth.pro | + | $ fab -H $H nginx.install_yum |
| + | </ | ||
| + | |||
| + | \\ | ||
| + | ==== Fabric Temporary Run Call Examples ==== | ||
| + | <sxh bash toolbar: | ||
| + | $ H=test-server-1, | ||
| + | |||
| + | $ fab -H $H -- sudo systemctl status nginx | ||
| + | $ fab -H $H -- sudo systemctl restart nginx | ||
| + | |||
| + | $ fab -H $H -- "nginx -t" | ||
| + | $ fab -H $H -- "nginx -t -c /etc/nginx/nginx.conf" | ||
| + | |||
| + | $ fab -H $H -- "ps aux |grep nginx" | ||
| + | $ fab -H $H -- " | ||
| </ | </ | ||
| Line 26: | Line 44: | ||
| from fabric.api import * | from fabric.api import * | ||
| from fabric.contrib import files | from fabric.contrib import files | ||
| + | from datetime import datetime | ||
| # | # | ||
| Line 45: | Line 64: | ||
| # Check Configuration Files | # Check Configuration Files | ||
| # | # | ||
| + | # nginx.check_files_etc_nginx | ||
| + | @task | ||
| + | def check_nginx.conf(): | ||
| + | ''' | ||
| + | sudo(" | ||
| + | |||
| # nginx.check_files_etc_nginx | # nginx.check_files_etc_nginx | ||
| @task | @task | ||
| Line 50: | Line 75: | ||
| ''' | ''' | ||
| run(" | run(" | ||
| + | |||
| Line 65: | Line 91: | ||
| \\ | \\ | ||
| - | ===== Configuration ===== | + | ===== Nginx Configuration |
| *[[middleware: | *[[middleware: | ||
| *[[middleware: | *[[middleware: | ||
| Line 74: | Line 100: | ||
| \\ | \\ | ||
| <WRAP box 90%> | <WRAP box 90%> | ||
| - | < | + | <catlist .: -noAddPageButton -smallHead -sortAscending> |
| </ | </ | ||
| \\ | \\ | ||
| [[: | [[: | ||
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.