Skip to content

Instantly share code, notes, and snippets.

@bunnywong
Last active January 2, 2016 06:55
Show Gist options
  • Select an option

  • Save bunnywong/0dbb09496a415fa6c00f to your computer and use it in GitHub Desktop.

Select an option

Save bunnywong/0dbb09496a415fa6c00f to your computer and use it in GitHub Desktop.
Vagrant

Vagrant init

vagrant box add hashicorp/precise32
vagrant init sixlive/tjay-ubuntu-12-php-53

Apache

cd /etc/apache2/sites-available/
sudo a2ensite example.com.conf
sudo a2enmod rewrite
# Wordpress example
<VirtualHost *:80>
  ServerAdmin webmaster@localhost
      ServerName example.com
      ServerAlias example.com
  DocumentRoot /var/www/example.com
  <Directory />
  	Options FollowSymLinks
  	AllowOverride All
  </Directory>
  <Directory /var/www/example.com/>
  	Options Indexes FollowSymLinks MultiViews
  	AllowOverride All
  	Order allow,deny
  	allow from all
  </Directory>

  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  <Directory "/usr/lib/cgi-bin">
  	AllowOverride None
  	Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  	Order allow,deny
  	Allow from all
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn

  CustomLog ${APACHE_LOG_DIR}/access.log combined

  Alias /doc/ "/usr/share/doc/"
  <Directory "/usr/share/doc/">
      Options Indexes MultiViews FollowSymLinks
      AllowOverride None
      Order deny,allow
      Deny from all
      Allow from 127.0.0.0/255.0.0.0 ::1/128
  </Directory>

</VirtualHost>

MySQL - Reset password

mysqladmin -u root password root

PMA init

sudo ln -s /usr/share/phpmyadmin pma

--------------------------------------------------

PHP 5.4 with ubuntu 12.04

vagrant init hashicorp/precise64

install LAMP: ( digital ocean ref )

upgrade to php 5.4

  sudo apt-get install python-software-properties
  sudo apt-add-repository ppa:ondrej/php5-oldstable
  sudo apt-get update
  sudo apt-get install php5

--------------------------------------------------

Other in Vagrant file

config.ssh.username = 'root'
config.ssh.password = 'vagrant'
config.ssh.insert_key = 'true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment