- Name: vagrant-centos
- Operating System: Linux
- Version: Red Hat
This file contains 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 characters
# BEGIN Custom | |
Options -Indexes | |
RewriteEngine On | |
RewriteCond $1 !^wordpress/ | |
RewriteRule ^(.*)$ wordpress/$1 [L] | |
# END Custom |
This file contains 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 characters
# 4 workers is enough for our app | |
worker_processes 4 | |
# App location | |
@app = "/var/rails/myapp/current" | |
# Listen on fs socket for better performance | |
listen "#{@app}/tmp/sockets/unicorn.sock", :backlog => 64 | |
# Nuke workers after 30 seconds instead of 60 seconds (the default) |
This file contains 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 characters
gem 'unicorn' |
This file contains 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 characters
# Nginx optimal congifuration guide. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.2.tar.gz | |
$ tar xzvf ./nginx-1.2.2.tar.gz && rm -f ./nginx-1.2.2.tar.gz | |
$ wget http://zlib.net/zlib127.zip |
This file contains 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 characters
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
This file contains 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 characters
CREATE USER 'sysadmin'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON `appname_environment`.* TO 'sysadmin'@'localhost'; |
This file contains 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 characters
# CentOS 6.4 barebones walkthrough guide for a new vps rails server instance | |
# assumes you already have a personal ssh key locally | |
# | |
# script implements the following security approaches: | |
# disables root login | |
# configures ssh setup for deployer user | |
# opens up standard ports | |
# | |
# setup includes: | |
# rvm & ruby-1.9.3-p429 |
This file contains 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 characters
def parse_decimal_from_string(value) | |
value.scan(/[-+]?\d*\.?\d+/).join('') | |
end |
This file contains 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 characters
# from your user dir | |
cd | |
# create or update .bash_profile | |
touch .bash_profile | |
# Install RVM: (https://rvm.io/rvm/install/) | |
curl -L get.rvm.io | bash -s stable |