Skip to content
This repository was archived by the owner on Sep 4, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
24e6c30
Configuration change from latest VVV
richpav Aug 16, 2014
605116c
Update VM box from Ubuntu 12.0.4 Precise 32 to Ubuntu 14.04 Trusty 64
richpav Aug 16, 2014
f315bd7
Shares mounted using NFS for improved performance.
richpav Aug 16, 2014
3f7f54a
Change to triggers from latest VVV.
richpav Aug 16, 2014
cd8e144
SVN, PHP 5.4, Git 1.8 removed.
richpav Aug 16, 2014
c126b56
phpunit-composer no longer in VVV.
richpav Aug 16, 2014
3315f7f
Changes necessary for Apache 2.2 to 2.4 upgrade.
richpav Aug 16, 2014
92130c0
New files from VVV.
richpav Aug 16, 2014
56fc244
MySQL hack apparently no longer needed. This change is from the lates…
richpav Aug 16, 2014
0299064
I think I only added PageSpeed, tree, and packages for NFS.
richpav Aug 16, 2014
2fd9191
All these changes are from the latest VVV.
richpav Aug 16, 2014
76948c8
Changes from latest VVV.
richpav Aug 16, 2014
ff84489
Added Sexy Bash Prompt
richpav Aug 17, 2014
2e882b0
Remove APC configs.
richpav Aug 17, 2014
166572c
Update README.md
richpav Aug 17, 2014
49a78d1
Forgot to add these from Apache-VVV
richpav Aug 17, 2014
eb8440f
Minor change to comments.
richpav Aug 17, 2014
5b2e21b
Increase fcgi idle-timeout from default of 30 sec to 250 to stop freq…
richpav Sep 6, 2014
0653c93
I have no idea why I made this change.
richpav Sep 6, 2014
85f1c0b
God-awful mess to configure fcgi. Miraculously, it seems to work.
richpav Sep 6, 2014
5118c66
Disabled xdebug autostart because it was causing a problem. I should …
richpav Sep 6, 2014
0df9a58
Using phpMyAdmin 4.2.7.1
richpav Sep 6, 2014
af5559b
Cosmetic & spelling changes from VVV
richpav Sep 6, 2014
6876cd7
PHPCS related
richpav Sep 6, 2014
17003ea
Change from VVV
richpav Sep 6, 2014
7dda6a0
Memory bumped up to 1 MB, from VVV
richpav Sep 6, 2014
e80c75a
Update change log
richpav Sep 6, 2014
fa1f00a
VirtualHost configurations updated to use mod_proxy_fcgi
richpav Oct 12, 2014
260b893
Mostly stuff to get mod_proxy_fcgi and PHP-FPM working.
richpav Oct 12, 2014
f27b338
Touch-ups to upgrade versions & add latest updates from VVV.
richpav Oct 12, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# vvv-apache-nfs-pagespeed-mod_proxy_fcgi Changelog

### 1.1.0
* mod_proxy_fcgi is really working now.
* ack-2.14
* phpMyAdmin-4.2.9
* Latest updates from VVV

### 1.0.1
* Added Sexy bash prompt
* Removed APC configs.
* mod_proxy_fcgi replaces FastCGI (mod_fastcgi.c)
* Incorporated latest VVV updates

### 1.0
* Updated to Ubuntu 14.04.01 x64, ergo Apache 2.4 and no more APC.
* Added Google PageSpeed.
* Shares mounted with NFS
* Added some php5-fpm-config files from Apache-VVV that I overlooked.

# Varying Vagrant Vagrants Changelog

## 1.0.1
Expand Down
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing to VVV

Contributions to the VVV project are more than welcome.

## License

By contributing code to the [VVV project](https://github.com/varying-vagrant-vagrants/vvv/), you agree to license your contribution under the [MIT License](https://github.com/varying-vagrant-vagrants/vvv/blog/master/LICENSE).

## Issues

Open a GitHub issue for anything. We've covered quite a bit of ground through the first year, so it would be helfpul to search for related topics first. That said, don't worry if you find yourself opening something that sounds like it could be obvious. There is no such thing.

## Comments

Comment on any GitHub issue, open or closed. The only guidelines here are to be friendly and welcoming. If you see that a question has been asked and you think you know the answer, don't wait!

## Pull Requests

Submit a pull request at any time, whether an issue has been created or not. It may be helpful to discuss your goals in an issue first, though many things can best be shown with code.

We do ask that the pull request be submitted against the current **master** branch. Every effort is made to make the pull request as stable as possible before merging it in, so we aren't too worried. A list of stable releases is maintained as we go and can be used by anyone concerned by ongoing development.

It may make sense that a feature branch is created so that several contributors can work together. In this case, it is possible that write access to the VVV repository will be given liberally. You may be asked to submit your pull request against a feature branch so that it can be merged and worked on with others before going in to master.

## Milestones and Labels

Some loose organization has grown around milestones and labels. We'll often have the next two versions listed for selection as a milestone. Things like bugs, enhancements, docs, etc... are listed as labels.

## Code Style

### Bash Scripting

For any shell scripting that we do in Bash — see `provision.sh` — we try to follow the style provided in Google's [Shell Style Guide](http://google-styleguide.googlecode.com/svn/trunk/shell.xml).

### PHP

For any PHP, we try to follow the WordPress core [code standards](http://make.wordpress.org/core/handbook/coding-standards/).
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 the contributors of the VVV project

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:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
201 changes: 142 additions & 59 deletions README.md

Large diffs are not rendered by default.

75 changes: 61 additions & 14 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Vagrant.configure("2") do |config|

# Configurations from 1.0.x can be placed in Vagrant 1.1.x specs like the following.
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 512]
v.customize ["modifyvm", :id, "--memory", 1024]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end

# Forward Agent
Expand All @@ -23,11 +25,10 @@ Vagrant.configure("2") do |config|

# Default Ubuntu Box
#
# This box is provided by Vagrant at vagrantup.com and is a nicely sized (290MB)
# box containing the Ubuntu 12.0.4 Precise 32 bit release. Once this box is downloaded
# This box is provided by Ubuntu vagrantcloud.com and is a nicely sized (332MB)
# box containing the Ubuntu 14.04 Trusty 64 bit release. Once this box is downloaded
# to your host computer, it is cached for future use under the specified box name.
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.box = "ubuntu/trusty64"

config.vm.hostname = "vvv"

Expand Down Expand Up @@ -81,6 +82,10 @@ Vagrant.configure("2") do |config|
# for those as well. This includes other Vagrant boxes.
config.vm.network :private_network, ip: "192.168.50.4"

# NFS configuration
config.nfs.map_uid = Process.uid
config.nfs.map_gid = Process.gid

# Drive mapping
#
# The following config.vm.synced_folder settings will map directories in your Vagrant
Expand All @@ -96,11 +101,20 @@ Vagrant.configure("2") do |config|
# a mapped directory inside the VM will be created that contains these files.
# This directory is used to maintain default database scripts as well as backed
# up mysql dumps (SQL files) that are to be imported automatically on vagrant up
config.vm.synced_folder "database/", "/srv/database"
if vagrant_version >= "1.3.0"
config.vm.synced_folder "database/data/", "/var/lib/mysql", :mount_options => [ "dmode=777", "fmode=777" ]
else
config.vm.synced_folder "database/data/", "/var/lib/mysql", :extra => 'dmode=777,fmode=777'
config.vm.synced_folder "database/", "/srv/database", type: "nfs"

# If the mysql_upgrade_info file from a previous persistent database mapping is detected,
# we'll continue to map that directory as /var/lib/mysql inside the virtual machine. Once
# this file is changed or removed, this mapping will no longer occur. A db_backup command
# is now available inside the virtual machine to backup all databases for future use. This
# command is automatically issued on halt, suspend, and destroy if the vagrant-triggers
# plugin is installed.
if File.exists?(File.join(vagrant_dir,'database/data/mysql_upgrade_info')) then
if vagrant_version >= "1.3.0"
config.vm.synced_folder "database/data/", "/var/lib/mysql", type: "nfs"
else
config.vm.synced_folder "database/data/", "/var/lib/mysql", type: "nfs"
end
end

# /srv/config/
Expand All @@ -109,17 +123,23 @@ Vagrant.configure("2") do |config|
# a mapped directory inside the VM will be created that contains these files.
# This directory is currently used to maintain various config files for php and
# Apache as well as any pre-existing database files.
config.vm.synced_folder "config/", "/srv/config"
config.vm.synced_folder "config/", "/srv/config", type: "nfs"

# /srv/log/
#
# If a log directory exists in the same directory as your Vagrantfile, a mapped
# directory inside the VM will be created for some generated log files.
config.vm.synced_folder "log/", "/srv/log", type: "nfs"

# /srv/www/
#
# If a www directory exists in the same directory as your Vagrantfile, a mapped directory
# inside the VM will be created that acts as the default location for Apache sites. Put all
# inside the VM will be created that acts as the default location for nginx sites. Put all
# of your project files here that you want to access through the web server
if vagrant_version >= "1.3.0"
config.vm.synced_folder "www/", "/srv/www/", :owner => "www-data", :mount_options => [ "dmode=775", "fmode=774" ]
config.vm.synced_folder "www/", "/srv/www/", type: "nfs"
else
config.vm.synced_folder "www/", "/srv/www/", :owner => "www-data", :extra => 'dmode=775,fmode=774'
config.vm.synced_folder "www/", "/srv/www/", type: "nfs"
end

# Customfile - POSSIBLY UNSTABLE
Expand Down Expand Up @@ -164,4 +184,31 @@ Vagrant.configure("2") do |config|
if File.exists?(File.join(vagrant_dir,'provision','provision-post.sh')) then
config.vm.provision :shell, :path => File.join( "provision", "provision-post.sh" )
end

# Always start MySQL on boot, even when not running the full provisioner
# (run: "always" support added in 1.6.0)
if vagrant_version >= "1.6.0"
config.vm.provision :shell, inline: "sudo service mysql restart", run: "always"
end

# Vagrant Triggers
#
# If the vagrant-triggers plugin is installed, we can run various scripts on Vagrant
# state changes like `vagrant up`, `vagrant halt`, `vagrant suspend`, and `vagrant destroy`
#
# These scripts are run on the host machine, so we use `vagrant ssh` to tunnel back
# into the VM and execute things. By default, each of these scripts calls db_backup
# to create backups of all current databases. This can be overridden with custom
# scripting. See the individual files in config/homebin/ for details.
if defined? VagrantPlugins::Triggers
config.trigger.before :halt, :stdout => true do
run "vagrant ssh -c 'vagrant_halt'"
end
config.trigger.before :suspend, :stdout => true do
run "vagrant ssh -c 'vagrant_suspend'"
end
config.trigger.before :destroy, :stdout => true do
run "vagrant ssh -c 'vagrant_destroy'"
end
end
end
5 changes: 1 addition & 4 deletions config/apache-config/apache2.conf
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ServerName localhost
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
LockFile ${APACHE_LOCK_DIR}/accept.lock
Mutex file:${APACHE_LOCK_DIR} default

#
# PidFile: The file in which the server should record its process
Expand Down Expand Up @@ -211,9 +211,6 @@ LogLevel warn
Include mods-enabled/*.load
Include mods-enabled/*.conf

# Include all the user configurations:
Include httpd.conf

# Include ports listing
Include ports.conf

Expand Down
6 changes: 0 additions & 6 deletions config/apache-config/php5-fpm.conf

This file was deleted.

24 changes: 22 additions & 2 deletions config/apache-config/sites/wordpress-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@
# - SVN repository of WordPress trunk
# - Files available locally in this repository's www/wordpress-trunk
# - Files available on guest (vagrant ssh) in /srv/www/wordpress-trunk
#
# http://src.wordpress-develop.dev
# http://build.wordpress-develop.dev

# Got the idea from here: http://gregrickaby.com/wordpress-with-apache-2-4-and-php-5-5/
<Directory "/srv/www/">
Order allow,deny
Allow from all
Require all granted
AllowOverride All
Options All
</Directory>

# TODO: Which is better, Options ALL or Options +Indexes
# TODO: VirtualDocumentRoot /Users/daddy/Copy/WordpressDev/vhosts/%0
# TODO: Each vhost has its own set of access & error logs
# TODO: Which is better, AllowOverride All or AllowOverride FileInfo All?

################################################################
# Default Apache catch-all server
Expand All @@ -26,6 +41,7 @@
<VirtualHost *:80>
DocumentRoot /srv/www/default
ServerName vvv.dev
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/www/default/$1
</VirtualHost>

################################################################
Expand All @@ -38,6 +54,7 @@
<VirtualHost *:80>
DocumentRoot /srv/www/wordpress-default
ServerName local.wordpress.dev
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/www/wordpress-default/$1
</VirtualHost>

################################################################
Expand All @@ -50,6 +67,7 @@
<VirtualHost *:80>
DocumentRoot /srv/www/wordpress-trunk
ServerName local.wordpress-trunk.dev
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/www/wordpress-trunk/$1
</VirtualHost>

################################################################
Expand All @@ -62,6 +80,7 @@
<VirtualHost *:80>
DocumentRoot /srv/www/wordpress-develop/src
ServerName src.wordpress-develop.dev
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/www/wordpress-develop/src/$1
</VirtualHost>

################################################################
Expand All @@ -74,4 +93,5 @@
<VirtualHost *:80>
DocumentRoot /srv/www/wordpress-develop/build
ServerName build.wordpress-develop.dev
</VirtualHost>
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/www/wordpress-develop/build/$1
</VirtualHost>
17 changes: 4 additions & 13 deletions config/apt-source-append.list
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
# Additional sources will be added here to help control the
# versions of various packages that are installed

# Provides SVN 1.7.9
deb http://ppa.launchpad.net/svn/ppa/ubuntu precise main
deb-src http://ppa.launchpad.net/svn/ppa/ubuntu precise main

# Provides PHP 5.4
deb http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu precise main
deb-src http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu precise main

# Provides Git 1.8
deb http://ppa.launchpad.net/git-core/ppa/ubuntu precise main
deb-src http://ppa.launchpad.net/git-core/ppa/ubuntu precise main
# Provides PageSpeed, but once installed PageSpeed adds its PPA to /etc/apt/sources.list.d
#deb http://dl.google.com/linux/mod-pagespeed/deb/ stable main

# Provides Node.js
deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu precise main
deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu precise main
deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main
deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main
14 changes: 14 additions & 0 deletions config/bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ if [ -n "$BASH_VERSION" ]; then
fi
fi

# setup bash prompt
if [ -n "$BASH_VERSION" ]; then
# include .bash_prompt if it exists
if [ -f "$HOME/.bash_prompt" ]; then
. "$HOME/.bash_prompt"
fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
Expand All @@ -24,3 +32,9 @@ export WP_TESTS_DIR=/srv/www/wordpress-develop/tests/phpunit/

# add autocomplete for grunt
eval "$(grunt --completion=bash)"

# add autocomplete for wp-cli
. /srv/www/wp-cli/utils/wp-completion.bash

# PHPCS path
export PATH="$PATH:/srv/www/phpcs/scripts/"
Loading