Skip to content

Instantly share code, notes, and snippets.

View mdrmike's full-sized avatar

mike stewart mdrmike

View GitHub Profile
##------------------------------------
# NGINX VHOST TEMPLATE FOR DRUPALPRO
#-------------------------------------
#
# FIND AND REPLACE ##=VARIABLES==
# ##==SERVER_TLD== -- FQDN (aka URL)
# (multiple comma separated URI's is ok).
# Example: foobar.dev, *.foobar.dev, AwesomeWebsite.com
#
# ##==PATH_TO_SITE== -- ABSOLUTE PATH TO DRUPAL
@mdrmike
mdrmike / phpmyadmin.conf
Last active January 12, 2022 21:44
NGINX vhost file for phpmyadmin on ubuntu 14.04 using sudo-apt get install phpmyadmin ,,, install as normal but don't select webserver (neither apache nor lighttpd). add this to /etc/nginx/sites-available/ then enable by adding to sites-enabled and add 127.0.0.1 phpmyadmin to /etc/hosts
server {
listen 80;
server_name phpmyadmin;
root /usr/share/phpmyadmin/;
index index.php index.html;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
@mdrmike
mdrmike / php_drupalpro.ini
Created May 14, 2014 22:04
php5 php_drupalpro.ini overrides for Drupal
; PHP overides for Drupal development
; copyright 2014 Michael Stewart and Licensed under GNU General Public License 3.0: http://www.gnu.org/licenses/gpl.txt
; NGINX REQUIREMENTS
cgi.fix_pathinfo=0
; DRUPAL REQUIREMENTS
; BASED ON https://drupal.org/requirements/php
error_reporting = E_ALL & ~E_NOTICE
safe_mode: Off
@mdrmike
mdrmike / Ubuntu 14.04 + NGINX + PHP5-FPM + MARIADB.md
Last active February 4, 2016 23:17
Ubuntu 14.04 NGINX WebServer for production, development, and/or desktop use.

UPDATE UBUNTU 14.04

sudo apt-get update
sudo apt-get -y upgrade

CORE INSTALL

note: you'll need to enter a root password for mysql

sudo apt-get -y install nginx php5-fpm php5-cli php5-gd mariadb-server-5.5

Optional: Install Development related apps

sudo apt-get -y install git phpmyadmin

@mdrmike
mdrmike / ubuntu1404-webserver-build.sh
Last active February 4, 2016 23:16
Bash script to Setup Ubuntu 14.04 + Nginx + PHP-FPM + Maria and other optional tools based on for https://gist.github.com/mdrmike/2fb54d72bd9c4075dd5e
#!/bin/bash
# Setup Script to configure Ubuntu 14.04 as an NGINX webserver configured for
# Drupal. This script will install and configure NGINX + PHP5-FPM + MARIADB and
# Optionally instal and configure additional development and desktop software.
#
# THE MIT LICENSE
# Copyright (C) 2014, Michael Stewart www.zaferia.net
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
@mdrmike
mdrmike / HOWTO: Drupalpro --Manually Setup Website.md
Last active November 26, 2015 17:39
HowTo: Manually Setup a New Website in Drupalpro

How to Setup a New Website

============================

This is an example of how to use Drupalpro, to manually setup a Drupal7 website called foobar.dev. This does not make use of the addon drush scripts to automate the process, but demonstrates how to manually add a website.

OVERVIEW

  • Create website root folder
@mdrmike
mdrmike / post-receive
Last active April 19, 2016 18:51
post-recieve hook to automatically deploy a git branch to either staging or production. (or do nothing)
#!/bin/bash
# git/hooks/post-receive
# add this script to a git repo on a 'remote' server
# to automatically deploy a git branch to either staging or production (or do nothing)
WORK_TREE_PROD=$HOME/production # assumes logged in user HOME/production path is webroot
WORK_TREE_STAGE=$HOME/staging # assumes logged in user HOME/staging path is webroot
GIT_DIR=$HOME/git # assumes remote git repo is in HOME/git (no dot - not hidden)
@mdrmike
mdrmike / TEMPLATE_drupalpro.conf
Last active August 29, 2015 14:14
NGINX VHOST TEMPLATE FOR DRUPALPRO
##------------------------------------
# NGINX VHOST TEMPLATE FOR DRUPALPRO
# Based on: http://wiki.nginx.org/Drupal
#-------------------------------------
#
# FIND AND REPLACE ##__VARIABLES__## in text editor
#
# ##__SERVER_TLD__## -- FQDN (aka URL) Example: foobar.dev, *.foobar.dev, AwesomeWebsite.com (multiple comma separated URI's is ok).
# ##__PATH_TO_SITE__## -- ABSOLUTE PATH TO DRUPAL Example: /home/drupalpro/websites/foobar.dev/www
# ##__D7_D8__## Drupal 7-8, Find & ERASE these variables
@mdrmike
mdrmike / LBWP--1502.md
Created January 28, 2015 19:35
Long Beach Web and Mobile Professionals -- news Feb 2105 (WIP)
#!/bin/bash
PROGRAMS="$HOME/Programs"
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):