http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/GetStarted.html
phpMyAdmin
Type | Protocol | Port Range | Destination |
---|---|---|---|
SSH | TCP | 22 | 0.0.0.0/0 |
//Edit this based on the max amount you want to spend on a given day. | |
var maxSpend = 1000; | |
function main () { | |
var currentAccount = AdWordsApp.currentAccount(); | |
var stats = currentAccount.getStatsFor("TODAY"); | |
var cost = stats.getCost(); | |
Logger.log("Account has spent " + cost + " so far."); | |
if (cost > maxSpend) { | |
campaign.pause(); |
// Comma-separated list of recipients. Comment out to not send any emails. | |
var RECIPIENT_EMAIL = 'YOUR_EMAIL'; | |
// URL of the default spreadsheet template. This should be a copy of http://goo.gl/pxaZio | |
var SPREADSHEET_URL = 'SPREADSHEET_URL'; | |
/** | |
* This script computes an Ad performance report | |
* and outputs it to a Google spreadsheet | |
*/ |
/********************************************* | |
* Automated Creative Testing With Statistical Significance | |
* Version 2.1 | |
* Changelog v2.1 | |
* - Fixed INVALID_PREDICATE_ENUM_VALUE | |
* Changelog v2.0 | |
* - Fixed bug in setting the correct date | |
* - Script now uses a minimum visitors threshold | |
* per Ad instead of AdGroup | |
* - Added the ability to add the start date as a label to AdGroups |
var http = require('http'); | |
var util = require('util'); | |
var heapdump = require('heapdump'); | |
var memwatch = require('memwatch'); | |
var server = http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
for (var i=0; i<1000; i++) { | |
server.on('request', function leakyfunc() { |
:: UPDATE YUM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
sudo yum update -y | |
:: INSTALL WEBSERVER ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
sudo yum install httpd24 | |
sudo service httpd start | |
sudo chkconfig httpd on | |
chkconfig --list httpd |
http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/GetStarted.html
phpMyAdmin
Type | Protocol | Port Range | Destination |
---|---|---|---|
SSH | TCP | 22 | 0.0.0.0/0 |
server { | |
index index.php; | |
set $basepath "/var/www"; | |
set $domain $host; | |
# check one name domain for simple application | |
if ($domain ~ "^(.[^.]*)\.dev$") { | |
set $domain $1; | |
set $rootpath "${domain}"; |
location ~* \.(jpe?g|gif|png)$ { | |
try_files $uri @photon; | |
} | |
location @photon { | |
rewrite ^(.*)-([0-9]+)x([0-9]+)\.(jpe?g|gif|png)$ http://i0.wp.com/$host$1.$4?resize=$2,$3; | |
rewrite . http://i0.wp.com/$host$request_uri; | |
} |
This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.
This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.
If you experience any difficulties or have any feedback, leave a comment. 🐬
Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.
upstream phpfpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
upstream hhvm { | |
server unix:/var/run/hhvm/hhvm.sock; | |
} | |
# SSL | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |