Let's say you want to host domains first.com and second.com.
Create folders for their files:
| # config/unicorn.rb | |
| # Use at least one worker per core if you're on a dedicated server, | |
| # more will usually help for _short_ waits on databases/caches. | |
| worker_processes 4 | |
| # Since Unicorn is never exposed to outside clients, it does not need to | |
| # run on the standard HTTP port (80), there is no reason to start Unicorn | |
| # as root unless it's from system init scripts. | |
| # If running the master process as root and the workers as an unprivileged |
| # config/deploy.rb | |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rbenv' | |
| set :rbenv_path, '/usr/local/rbenv' | |
| set :domain, '<your_ip>' | |
| set :deploy_to, '<your_deploy_path>' |
| # /etc/nginx/sites-available/default | |
| upstream symbolet { | |
| server unix:/tmp/unicorn.<your_unicorn_sock>.sock fail_timeout=0; | |
| } | |
| server { | |
| server_name symbolet.com www.symbolet.com; | |
| listen 80; |
| /** | |
| * http://applemusic.tumblr.com/ | |
| */ | |
| /** Ultra Light */ | |
| @font-face { | |
| font-family: "San Francisco"; | |
| font-weight: 100; | |
| src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff2"); | |
| } |
| #!/bin/bash | |
| # | |
| # Highligh Nginx config file in Vim | |
| # Download syntax highlight | |
| mkdir -p ~/.vim/syntax/ | |
| wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim | |
| # Set location of Nginx config file | |
| cat > ~/.vim/filetype.vim <<EOF |
| /** | |
| * Detects if WebGL is enabled. | |
| * Inspired from http://www.browserleaks.com/webgl#howto-detect-webgl | |
| * | |
| * @return { number } -1 for not Supported, | |
| * 0 for disabled | |
| * 1 for enabled | |
| */ | |
| function detectWebGL() | |
| { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>AWS Cognito + Facebook Login JavaScript Example</title> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <body> | |
| <script src="https://sdk.amazonaws.com/js/aws-sdk-2.1.41.min.js"></script> | |
| <script> | |