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 characters
server { | |
listen 80 deferred; | |
server_name server.com; | |
index index.php; | |
charset utf-8; | |
# App 1 (main app) | |
location / { |
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 characters
# a2enmod proxy | |
# a2enmod proxy_http | |
# a2enmod proxy_ajp | |
# a2enmod rewrite | |
# a2enmod deflate | |
# a2enmod headers | |
# a2enmod proxy_balancer | |
# a2enmod proxy_connect | |
# a2enmod proxy_html |
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 characters
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
RewriteEngine On | |
# Redirect www to non www | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] |
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 characters
apt-get install zsh git-core -y | |
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh | |
chsh -s `which zsh` | |
sudo shutdown -r 0 | |
curl -L https://raw.githubusercontent.com/zsh-users/antigen/master/antigen.zsh > antigen.zsh | |
source antigen.zsh |
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 characters
#rewrite to HTTPS: | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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 characters
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list | |
apt-cache policy docker-engine | |
apt-get install docker-engine -y | |
MORE: https://docs.docker.com/engine/installation/linux/ubuntulinux/ |
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 characters
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
apt-get install nodejs -y | |
npm install -g npm@latest | |
npm install -g webpack webpack-dev-server typings lite-server express |
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 characters
# install required package (php5 dev, open ssl library and pcre) | |
sudo apt-get install php5-dev libssl-dev libcurl4-openssl-dev clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev apt-get install libpcre3-dev -y | |
# build mongodb extension for PHP | |
pecl install mongodb |
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 characters
mongod -f "D:\Playground\mongodb\server.conf" | |
--install --serviceName mdb27017 | |
--serviceDisplayName "MongoDB Server Instance 27017" | |
--serviceDescription "MongoDB Server Instance running on 27017" |
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 characters
server { | |
listen 80; | |
server_name some.domain; | |
root /path/to/file; | |
index index.php index.htm index.html; | |
location ~ .php$ { | |
#try_files $uri =404; |