create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| #!/bin/bash | |
| BUCKETNAME="your_s3_bucket" | |
| LOGDIR="/opt/nginx/logs" | |
| LOGDATE=$(date +"%Y%m%d") | |
| LOGFILES=( "access" "ssl-access" ) | |
| BOT_LOGFILES=( "bots-access" "bots-ssl-access" ) | |
| echo "Moving access logs to dated logs.." |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| # Nginx - logrotate & upload to S3 | |
| 0 0 * * * /usr/sbin/logrotate /etc/logrotate.d/nginx | |
| 15 0 * * * s3cmd put /var/log/nginx/access.log-`date +"\%Y\%m\%d"`.gz s3://$LOGS_BUCKET_NAME/nginx-access/`date +"dt=\%Y\%m\%d"`/`hostname -s`.access.log-`date +"\%Y\%m\%d"`.gz |
| ## Auto-restart PHP when it's returning errors | |
| # | |
| # Make sure that http://localhost/test.php is an actual PHP script. If it starts returning | |
| # 500 errors, restart the PHP-FPM service | |
| * * * * * /usr/bin/curl --head -sf http://localhost/test.php -o /dev/null || /usr/sbin/service php5-fpm restart |
This gist assumes: