-
Clone this repo to anywhere on your machine
git clone git@github.com:martonbognar/vagrant-nginx-php-mysql.git
-
Clone your repo inside this one and rename it to
src
, or start building your site inside a newly createdsrc
foldergit clone your-git-url-here.git src
-
By default, the setup script looks for a
schema.sql
file inside thesrc
folder, and creates a database calledlorem
based on it. You can change all of this in theprovision/setup.sh
file, by editing the relevant lines (1; 2; 36-37) -
You can add or edit port forwarding options in
Vagrantfile
, by default you can access the site atlocalhost:8080
-
To add rewrite rules or change other nginx-related settings, edit
provision/config/nginx_vhost
-
After setting up, run
vagrant up
in the root folder ofvagrant-nginx-php-mysql
- To stop the VM, run
vagrant halt
, to start it up again,vagrant up