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
class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
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
#acme | |
location ^~/.well-known { | |
default_type "text/plain"; | |
root /var/www/html; | |
} | |
events { | |
worker_connections 768; #10000 Load balancer | |
multi_accept on; | |
} | |
#Load balancer redirect http to https and http to www-version |
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
function gen_ssl_cert { | |
local prefix="${1}" | |
openssl genrsa -des3 -out "${prefix}.lock.key" 1024 | |
openssl rsa -in "${prefix}.lock.key" -out "${prefix}.key" | |
rm "${prefix}.lock.key" | |
openssl req -new -key "${prefix}.key" -out "${prefix}.csr" | |
openssl x509 -req -days 3650 -in "${prefix}.csr" -signkey "${prefix}.key" -out "${prefix}.crt" | |
openssl pkcs12 -export -inkey "${prefix}.key" -in "${prefix}.crt" -out "${prefix}.pfx" |