Install the OpenSSL on Debian based systems
sudo apt-get install openssl| listen l1 | |
| bind 0.0.0.0:443 | |
| mode tcp | |
| timeout connect 4000 | |
| timeout client 180000 | |
| timeout server 180000 | |
| server srv1 host.example.com:9443 |
| sudo yum install -y cloud-utils-growpart | |
| # You can use lsblk command to check the total available space of you disk. | |
| # growpart is used to to expand a partition to the whole disk (expand sda1 to sda) | |
| # xfs_growfs is used to resize and apply the changes | |
| # df -h | |
| # For more informations : https://blog.myduniahosting.com/how-to-resize-your-root-diskpartition-online-for-linux/ | |
| part=`df --output=source / |grep "/dev/"` | |
| if [ ! -z "$part" ] ; then | |
| len=${#part} |
| # install aws cli first and configure it with credentials and default region | |
| # the script will iterate over all regions of AWS | |
| for region in `aws ec2 describe-regions --output text | cut -f4` | |
| do | |
| echo -e "\nListing Instances in region:'$region'..." | |
| aws ec2 describe-instances --query "Reservations[*].Instances[*].{IP:PublicIpAddress,ID:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[0].Value}" --output=table --region $region | |
| done |
| if ($request_uri = /) { | |
| set $test A; | |
| } | |
| if ($host ~* teambox.com) { | |
| set $test "${test}B"; | |
| } | |
| if ($http_cookie !~* "auth_token") { | |
| set $test "${test}C"; |
| server { | |
| listen 80; | |
| server_name nagios.example.tld; | |
| access_log /var/log/nginx/nagios.access.log; | |
| error_log /var/log/nginx/nagios.error.log info; | |
| expires 31d; | |
| root /usr/share/nagios3/htdocs; |