Skip to content

Instantly share code, notes, and snippets.

View anthumchris's full-sized avatar

anthumchris

  • Colorado
View GitHub Profile
@anthumchris
anthumchris / post-receive
Last active March 29, 2017 18:25
Git Push to Deploy — Instantly deploy your local Git repository to your remote web server
#/bin/bash
# This script will push your local repository's latest commit to a remote repository on your server.
# It's useful for quickly pushing your local changes to deployment servers (Dev, Stage, Prod/Live, etc.)
#
# This file should be placed in your remote server's project's git hooks folder and named .git/hooks/post-receive.
# Security reminder: Your web server should not allow access to the /.git folder URL
#
# Ensure that this script is executable:
# $ chmod +x .git/hooks/post-receive
@anthumchris
anthumchris / nginx-dynamic-subdomains.conf
Last active February 27, 2018 13:37
Dynamically route subdomains to respective subdomain folders
server {
listen 80;
listen [::]:80;
server_name ~^(?<subdomain>\w+).dynamic.domain.com;
root /var/www/vhost/_dynamic/$subdomain;
access_log /var/log/nginx/dynamic-access.log;
error_log /var/log/nginx/dynamic-error.log;