-
-
Save josecarlospsh/1687eae04f7ac1969fd9 to your computer and use it in GitHub Desktop.
Revisions
-
janikvonrotz revised this gist
Mar 11, 2014 . No changes.There are no files selected for viewing
-
janikvonrotz revised this gist
Mar 5, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -94,7 +94,7 @@ listen 80; root /usr/share/nginx/www; } client_max_body_size 10M; # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { @@ -219,6 +219,8 @@ server{ index index.php index.html index.htm; client_max_body_size 10M; location ~ .php$ { try_files $uri = 404; fastcgi_pass unix:/var/run/php5-fpm.sock; -
janikvonrotz revised this gist
Mar 4, 2014 . No changes.There are no files selected for viewing
-
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -66,7 +66,7 @@ And run this command to get the MySQL version Install Nginx sudo apt-get install nginx Create a Nginx site configuration file sudo touch /etc/nginx/sites-available/wordpress.conf @@ -93,6 +93,8 @@ listen 80; location = /50x.html { root /usr/share/nginx/www; } client_max_body_size 2M; # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { @@ -216,7 +218,7 @@ server{ root /var/www/; index index.php index.html index.htm; location ~ .php$ { try_files $uri = 404; fastcgi_pass unix:/var/run/php5-fpm.sock; -
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -298,6 +298,11 @@ define('DB_USER', 'wordpress'); define('DB_PASSWORD', '[password]'); ``` Update permissions for Nginx user sudo chown www-data:www-data * -R sudo usermod -a -G www-data www-data Open the browser on http://example.com and install you WordPress blog ## Source -
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ Finishing this guide you'll get: * A running WordPress installation * Nginx proxy with PHP and Fast CGI * MySQL server accessible with phpMyAdmin Specification of latest running installation: -
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ Finishing this guide you'll get: * A running WordPress installation * Nginx proxy with PHP and Fast CGI * MySQL server accessiable with phpMyAdmin Specification of latest running installation: -
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 64 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,8 @@ Specification of latest running installation: * Date: 03.03.2014 * OS: Ubuntu 64 bit - 12.04.4 LTS * Provider: Amazon EC2 * Browser: Google Chrome - 33.0.1750.117 * WordPress: 3.8.1 * Nginx: 1.1.19 * MySQL: 5.5.35 * PHP: 5.3.10 @@ -47,12 +47,11 @@ Install the default MySQL databases sudo mysql_install_db Run the finisher script and respond every prompt with yes to get a secure MySQL installation sudo /usr/bin/mysql_secure_installation Connect to your new MySQL server mysql -uroot -p @@ -239,7 +238,67 @@ Open the browser on http://[YourPublicIP]/phpmyadmin/ ## WordPress Open the WordPress site directory cd /var/www/wordpress/ Download latest WordPress package and untar it sudo wget http://wordpress.org/latest.tar.gz tar -xzvf latest.tar.gz Copy the untared files to the current folder and delete the other files sudo cp -r ./wordpress/* ./ sudo rm -r wordpress sudo rm latest.tar.gz Let's create the MySQL WordPress user mysql -u root -p Enter the MySQL root user password Create the WordPress database CREATE DATABASE wordpress; Create the WordPress database user CREATE USER wordpress@localhost; Set the password for the WordPress database user SET PASSWORD FOR wordpress@localhost = PASSWORD("[password]"); Grant WordPress user full access on WordPress database GRANT ALL PRIVILEGES ON wordpress.* TO wordpress@localhost IDENTIFIED BY '[password]'; Refresh MySQL and exit FLUSH PRIVILEGES; exit Copy the WordPress example config file sudo cp wp-config-sample.php wp-config.php Edit the config file sudo vi wp-config.php Set database, database user and his password ``` define('DB_NAME', 'wordpress'); define('DB_USER', 'wordpress'); define('DB_PASSWORD', '[password]'); ``` Open the browser on http://example.com and install you WordPress blog ## Source -
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 16 additions and 15 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,8 +13,9 @@ Specification of latest running installation: * Browser: Google Chrome - ? * WordPress:? * Nginx: 1.1.19 * MySQL: 5.5.35 * PHP: 5.3.10 * phpMyAdmin: 3.4.10.1 Requirements @@ -151,6 +152,10 @@ Uncomment this line and change value to 0 If this number is kept as 1, the php interpreter will do its best to process the file that is as near to the requested file as possible. This is a possible security risk. If this number is set to 0, conversely, the interpreter will only process the exact file path—a much safer alternative. Find the line `; default extension directory.` and insert below extension=mcrypt.so Update the listening port for the php fpm sudo vi /etc/php5/fpm/pool.d/www.conf @@ -208,18 +213,13 @@ Paste this config server{ listen 80; server_name [Your Public IP]; root /var/www/; index index.php index.html index.htm; location ~ .php$ { try_files $uri = 404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include /etc/nginx/fastcgi_params; @@ -229,11 +229,13 @@ server{ Create a symlink to the config file sudo ln -s /etc/nginx/sites-available/phpmyadmin.conf /etc/nginx/sites-enabled/phpmyadmin.conf Restart Ngnix sudo service nginx restart Open the browser on http://[YourPublicIP]/phpmyadmin/ ## WordPress @@ -246,5 +248,4 @@ Restart Ngnix [How To Install phpMyAdmin on a LEMP server by Digi](https://www.digitalocean.com/community/articles/how-to-install-phpmyadmin-on-a-lemp-server/) [How To Install Wordpress with nginx on Ubuntu 12.04 by Digital Ocean](https://www.digitalocean.com/community/articles/how-to-install-wordpress-with-nginx-on-ubuntu-12-04) [Nginx rewrite rules](http://nginx.org/en/docs/http/converting_rewrite_rules.html) [Get MySQL version](https://dev.mysql.com/doc/refman/5.0/en/installation-version.html) -
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 101 additions and 45 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ Finishing this guide you'll get: * A running WordPress installation * Nginx proxy with PHP and Fast CGI * MySQL server with accessiable with phpMyAdmin Specification of latest running installation: @@ -50,10 +50,16 @@ Run the finisher script Respond with yes to get a have a secure MySQL installation sudo /usr/bin/mysql_secure_installation Connect to you new MySQL server mysql -uroot -p Enter the root password And run this command to get the MySQL version SHOW variables LIKE "%version%"; ## Nginx @@ -113,10 +119,10 @@ server { } ``` Create a symlink to the config file sudo ln -s /etc/nginx/sites-available/wordpress.conf /etc/nginx/sites-enabled/wordpress.conf Restart Ngnix sudo service nginx restart @@ -131,64 +137,114 @@ Install PHP with FastCGI support sudo apt-get install php5-fpm configure PHP installaton sudo vi /etc/php5/fpm/php.ini Find the line `cgi.fix_pathinfo=1` by pressing ESC and enter /;cgi.fix_pathinfo=1 Uncomment this line and change value to 0 cgi.fix_pathinfo=0 If this number is kept as 1, the php interpreter will do its best to process the file that is as near to the requested file as possible. This is a possible security risk. If this number is set to 0, conversely, the interpreter will only process the exact file path—a much safer alternative. Update the listening port for the php fpm sudo vi /etc/php5/fpm/pool.d/www.conf Set listen = /var/run/php5-fpm.sock Restart the service sudo service php5-fpm restart Create the website folder sudo mkdir /var/www/wordpress Add a PHP info file sudo vi /var/www/wordpress/info.php Set content ``` <?php phpinfo(); ?> ``` Open your browser on http://example.com/info.php Delete this file if everything works ## phpMyAdmin Install phpMyAdmin sudo apt-get install phpmyadmin When phpMyAdmin prompts you to choose a server (either apache or lighttpd)hit tab, and select neither one. When phpMyAdmin asks you wether to configure database for phpmyadmin with dbconfig-common. Chose <Yes> and enter the MySQL root user password Hit <OK> on the MySQL application password for phpmyadmin prompt. Create a symbolic link for the phpMyAdmin website sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/www Create a Nginx configuration file sudo touch /etc/nginx/sites-available/phpmyadmin.conf sudo vi /etc/nginx/sites-available/phpmyadmin.conf Paste this config ``` server{ listen 80; server_name localhost; root /var/www/phpmyadmin; index index.php index.html index.htm; if(!-e $request_filename){ rewrite ^/(.+)$ /index.php?url=$1 last; break; } location ~ .php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } } ``` Create a symlink to the config file sudo ln -s /etc/nginx/sites-available/wordpress.conf /etc/nginx/sites-enabled/wordpress.conf Restart Ngnix sudo service nginx restart ## WordPress ## Source [Install MySQL](http://dev.mysql.com/doc/refman/5.7/en/linux-installation-native.html) [How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 12.04 by Digital Ocean](https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04) [How To Install phpMyAdmin on a LEMP server by Digi](https://www.digitalocean.com/community/articles/how-to-install-phpmyadmin-on-a-lemp-server/) [How To Install Wordpress with nginx on Ubuntu 12.04 by Digital Ocean](https://www.digitalocean.com/community/articles/how-to-install-wordpress-with-nginx-on-ubuntu-12-04) [Nginx rewrite rules](http://nginx.org/en/docs/http/converting_rewrite_rules.html) [Get MySQL version](https://dev.mysql.com/doc/refman/5.0/en/installation-version.html) []() -
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 78 additions and 184 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Specification of latest running installation: * Provider: Amazon EC2 * Browser: Google Chrome - ? * WordPress:? * Nginx: 1.1.19 * MySQL: ? * PHP: ? @@ -34,6 +34,27 @@ Install additional packages sudo aptitude install build-essential zip git ## MySQL Install MySQL server and php5 MySQL module sudo apt-get install mysql-server php5-mysql Set the mysql root user password during the installation Install the default MySQL databases sudo mysql_install_db Run the finisher script Respond with yes to get a have a secure MySQL installation sudo /usr/bin/mysql_secure_installation Check MySQL version [add command] ## Nginx Install Nginx @@ -47,34 +68,68 @@ Create a Nginx site configuration file Paste this config ``` server { listen 80; root /var/www/wordpress; index index.php index.html index.htm; server_name [example.com]; location / { try_files $uri $uri/ /index.php?q=$uri&$args; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/www; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { try_files $uri = 404; #fastcgi_pass 127.0.0.1:9000; # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } ``` Optionally you can rewrite false urls to a specified canonical url ``` server { listen 80; server_name www.example.com example.com; if ($http_host = www.example.org) { rewrite (.*) http://[example.com]$1; } ... } ``` Create a symlink to your config file sudo ln -s /etc/nginx/sites-available/wordpress.conf /etc/nginx/sites-enabled/wordpress.conf Restart Ngnix sudo service nginx restart Check Nginx version nginx -v ## PHP Install PHP with FastCGI support sudo apt-get install php5-fpm ## WordPress @@ -129,172 +184,11 @@ Stop Ghost Register your Ghost Account Open your browser on http://[example.com]/ghost ## Source [Install MySQL](http://dev.mysql.com/doc/refman/5.7/en/linux-installation-native.html) [How To Install Linux, nginx, MySQL, PHP (LEMP) stack on Ubuntu 12.04 by Digital Ocean](https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04) [How To Install phpMyAdmin on a LEMP server by Digi](https://www.digitalocean.com/community/articles/how-to-install-phpmyadmin-on-a-lemp-server/) [How To Install Wordpress with nginx on Ubuntu 12.04 by Digital Ocean](https://www.digitalocean.com/community/articles/how-to-install-wordpress-with-nginx-on-ubuntu-12-04) [Nginx rewrite rules](http://nginx.org/en/docs/http/converting_rewrite_rules.html) -
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 12 additions and 198 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,20 @@ Finishing this guide you'll get: * A running WordPress installation * Nginx proxy with PHP * MySQL server Specification of latest running installation: * Date: 03.03.2014 * OS: Ubuntu 64 bit - 12.04.4 LTS * Provider: Amazon EC2 * Browser: Google Chrome - ? * WordPress:? * Nginx: ? * MySQL: ? * PHP: ? Requirements @@ -34,191 +33,6 @@ Update Ubuntu Install additional packages sudo aptitude install build-essential zip git ## Nginx @@ -228,8 +42,8 @@ Install Nginx Create a Nginx site configuration file sudo touch /etc/nginx/sites-available/wordpress.conf sudo vi /etc/nginx/sites-available/wordpress.conf Paste this config @@ -262,7 +76,7 @@ Do Set server_names_hash_bucket_size 128; sudo service nginx restart ## WordPress Create the website folder -
janikvonrotz revised this gist
Mar 3, 2014 . No changes.There are no files selected for viewing
-
janikvonrotz revised this gist
Mar 3, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ Finishing this guide you'll get: * A running WordPress installation * Amazon SES mail configuration * Simple ssh hardenings * Nginx proxy -
janikvonrotz created this gist
Mar 3, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,486 @@ Finishing this guide you'll get: * A running Ghost installation * Amazon SES mail configuration * Simple ssh hardenings * Nginx proxy * Node.js configured with forever Specification of latest running installation: * Date: 21.01.2014 * OS: Ubuntu 64 bit - 12.04.4 LTS * Provider: Amazon EC2 * Mail service: Amazon SES * Browser: Google Chrome - 31.0.1650.63 * Ghost: 0.4 * Node: 0.10.24 * npm: 1.3.21 Requirements * Server is behind a firewall, that only allows http, https and ssh * The server is accessed with ssh keys (user password authentication must be disabled) * Server is not accessed with the root user * You're able to edit files with [VI](http://www.cheatography.com/ericg/cheat-sheets/vi-editor/) ## Ubuntu Update Ubuntu sudo apt-get update && sudo apt-get upgrade Install additional packages sudo aptitude install build-essential zip git ## SSH Change the default ssh port and disable root login sudo vi /etc/ssh/sshd_config Set Port [custom ssh port number] Set PermitRootLogin no Restart the ssh service sudo /etc/init.d/ssh restart Update firewall rules now to enable ssh connection with your custom port Reconnect your ssh host with the new port number ssh -p [custom ssh port number] user@host ## Fail2Ban Install Fail2Ban sudo apt-get install fail2ban Copy the configuration file sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local Edit the config file sudo vi /etc/fail2ban/jail.local Make the following changes: [ssh] port = [custom ssh port number] And [ssh-ddos] enabled = true port = [custom ssh port number] Finish editing and restart fail2ban service sudo service fail2ban restart ## Network Edit the network configuration file sudo vi /etc/sysctl.conf Paste the this configuration file to improve network security ``` # # /etc/sysctl.conf - Configuration file for setting system variables # See /etc/sysctl.d/ for additional system variables # See sysctl.conf (5) for information. # # Uncomment the next two lines to enable Spoof protection (reverse-path filter) # Turn on Source Address Verification in all interfaces to # prevent some spoofing attacks net.ipv4.conf.default.rp_filter=1 net.ipv4.conf.all.rp_filter=1 # Uncomment the next line to enable TCP/IP SYN cookies net.ipv4.tcp_syncookies=1 net.ipv4.tcp_max_syn_backlog = 2048 net.ipv4.tcp_synack_retries = 2 net.ipv4.tcp_syn_retries = 5 # Do not accept ICMP redirects (prevent MITM attacks) net.ipv4.conf.all.accept_redirects = 0 net.ipv6.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0 # Do not send ICMP redirects (we are not a router) net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 # Do not accept IP source route packets (we are not a router) net.ipv4.conf.all.accept_source_route = 0 net.ipv6.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv6.conf.default.accept_source_route = 0 # Log Martian Packets net.ipv4.conf.all.log_martians = 1 net.ipv4.icmp_ignore_bogus_error_responses = 1 # Ignore ICMP broadcast requests net.ipv4.icmp_echo_ignore_broadcasts = 1 # Ignore Directed pings net.ipv4.icmp_echo_ignore_all = 1 ``` ## Node.js You can install node either from website or the from the git repo. ### Install from source Download Node.js with wget wget http://nodejs.org/dist/node-latest.tar.gz Unpack Node.js tar -xzf node-latest.tar.gz cd [node folder] Install Node.js sudo ./configure sudo make sudo make install Check version of Node.js and npm node -v npm -v ### Install with Git Clone the Node.js repo cd /usr/local/src sudo git clone git://github.com/joyent/node.git Check git tags to find the latest version cd node git tag See the latest stable version on http://nodejs.org/ Checkout the latest version sudo git checkout vX.X.X Install Node.js sudo ./configure sudo make sudo make install Check version of Node.js and npm node -v npm -v ## Update Node.js Depending on how you've installed Node.js theres an update strategy ### from source Repeat the installation process above ### with Git Pull down the latest source code cd /usr/local/src/node sudo git checkout master sudo git pull origin master Check git tags to find the latest version git tag See the latest stable version on http://nodejs.org/ Compile the latest version sudo git checkout vx.x.x sudo ./configure sudo make sudo make install ## Nginx Install Nginx sudo apt-get install nginx Create a Nginx site configuration file sudo touch /etc/nginx/sites-available/ghost.conf sudo vi /etc/nginx/sites-available/ghost.conf Paste this config server { listen 80; server_name [example.com]; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:2368; } } Create a symlink to your config file sudo ln -s /etc/nginx/sites-available/ghost.conf /etc/nginx/sites-enabled/ghost.conf Restart Ngnix sudo service nginx restart In case you'll get this error Restarting nginx: nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 64 Do sudo vi /etc/nginx/nginx.conf Set server_names_hash_bucket_size 128; sudo service nginx restart ## Ghost Create the website folder sudo mkdir -p /var/www/ cd /var/www/ Download Ghost with wget sudo wget https://ghost.org/zip/ghost-latest.zip Unpack Ghost sudo unzip -d ghost ghost-latest.zip cd ghost/ Install Ghost sudo npm install --production In case of errors for sqlite3 installation npm install sqlite3 --build-from-source Install forever sudo npm install forever -g Configure Ghost (productive environment only) sudo cp config.example.js config.js sudo vi config.js Set url: 'http://[example.com]', Start Ghost sudo NODE_ENV=production forever start index.js Start Ghost without forever sudo npm start --production Check if Ghost is running forever list Stop Ghost forever stop index.js Register your Ghost Account Open your browser on http://[example.com]/ghost ## Ghost Mail Ghost uses [Nodemailer](https://github.com/andris9/Nodemailer) to send e-mails, this modules has to be configured. Ghost supports various mail providers, you can see all of them in the [Ghost mail documentation](http://docs.ghost.org/mail/) ### SES Amazon's SES (Simple EMail Service) provides a reliable service to send mails. Requirements * Amazon Account * Verified domain and mail address on SES Create a new user in the [IAM service console](https://console.aws.amazon.com/iam/#users) and store the access keys in a secure place. Allow new user to send mail via SES with this policy configuration ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "ses:SendRawEmail", "Resource": "*" } ] } ``` Edit the Ghost config sudo vi config.js Add this mail configuration ``` mail: { transport: 'SES', options: { AWSAccessKeyID: '[acccess key]', AWSSecretKey: '[secret key]' } }, ``` Update mail settings http://[example.com]/ghost/settings/general/ Set Email Address: [verified SES mail address] Or sudo vi config.js And add this mail configuration mail: { fromaddress: '[verified SES mail address]', } Now you should be able to reset your Ghost password However at the time of writting this mail configuration doesn't seem to work despite it's an offical Ghost configuration In case you'll get this error when trying to reset your password Email Error: Email failed: 400 Sender MessageRejected Email address is not verified. 5a07d838-8381-11e3-ad96-5f67c4a04b97 Replace the the Ghost mail configuration with ``` mail: { transport: 'SMTP', fromaddress: '[verified SES mail address]', host: 'ssl://[SES smpt server address]', options: { port: 465, service: 'SES', auth: { user: '[acccess key]', pass: '[secret key]' } } }, ``` You can get your smtp settings [here](https://console.aws.amazon.com/ses/home?#smtp-settings:) ## Source [Install Node](https://github.com/joyent/node/wiki/Installation) [Install Node on Ubuntu](http://davidtsadler.com/archives/2012/05/06/installing-node-js-on-ubuntu/) [Install Ghost](http://docs.ghost.org/installation/linux/) [Deployment of Ghost](http://docs.ghost.org/installation/deploy/) [sqlite3 troubleshooting](http://docs.ghost.org/installation/troubleshooting/) [nginx fix hash buck size](http://charles.lescampeurs.org/2008/11/14/fix-nginx-increase-server_names_hash_bucket_size) [Install Ghost on Ubuntu, Nginx and MySQL](http://0v.org/installing-ghost-on-ubuntu-nginx-and-mysql/#.Ut5q2RBwZaQ) [Fail2Ban SSH Hardening](https://www.digitalocean.com/community/articles/how-to-protect-ssh-with-fail2ban-on-ubuntu-12-04) [Amazon EC2 Node Stack](https://github.com/niftylettuce/amazon-ec2-node-stack) [SES mail configuration](https://blog.ls20.com/install-ghost-0-3-3-with-nginx-and-modsecurity/#settingupemailonghost) ## Todo * Add Backup tutorial * ModSecurity for Nginx * PageSpeed for Nginx ## Issues [SES configuratio doesn't now working, even with a provided fix](https://ghost.org/forum/installation/4885-my-mail-ses-configuration-doesn-t-seem-to-work/) ## Issues solved [Sign up for a Ghost account might not possible](https://ghost.org/forum/installation/4627-can-t-sign-up-for-an-account-after-installation/) ## Backup (coming soon) http://manpages.ubuntu.com/manpages/intrepid/man1/s3cmd.1.html http://mikerogers.io/2013/08/01/backing-up-site-to-s3-on-ubuntu.html http://9ol.es/TheEmperorsNewClothes.html ``` { "Backup": { "Name": "[FileBackupName]", "OutputName": "[FileBackup.Name]#[TimeStamp]", "TimeStampFormat": "YYYY-MM-DD", "WeekStartsOn": "Monday", "Database": {}, "File": { "Path": [ "/var/www/ghost/", "/etc/nginx/sites-available/ghost" ] }, "Store": [ { "Name": "Local Backup", "Provider": "LocalDisk", "Path": "/var/backup/", "RetentionTime": "7 Days", "BackupType": "Daily", "Options": "" }, { "Name": "Remote Backup to S3", "Provider": "S3", "ConfigFile": "/etc/s3cmd/GhostBackup.s3cfg", "Url": "http:s3.amazonaws.com/(Bucket Name)/backup/", "ID": "", "Key": "", "RetentionTime": "10 Years", "BackupType": [ "Daily", "Weekly", "Monthly", "Yearly" ], "Options": [ "DeleteDailyBackupsAfterOneWeek", "DeleteWeeklyBackupsAfterOneMonth", "DeleteMonthlyBackupsAfterOneYear", "CompressFiles" ] } ] } } ```