Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8d0e78

Browse files
committed
Merge pull request dirkaholic#4 from jrobeson/master
convert to unix line endings
2 parents bfff2b7 + 0d773ed commit d8d0e78

File tree

4 files changed

+377
-377
lines changed

4 files changed

+377
-377
lines changed

Readme.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
Set up a PHP development box super fast
2-
=======================================
3-
4-
Installation
5-
------------
6-
7-
* Install vagrant using the installation instructions in the [Getting Started document](http://vagrantup.com/v1/docs/getting-started/index.html)
8-
* Add a Ubuntu Precise box using the [available official boxes](https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Boxes), for example: ```vagrant box add phpdevbox http://files.vagrantup.com/precise64.box``` (make sure it's named phpdevbox)
9-
* Clone this repository
10-
* Install submodules with ```git submodule update --init```
11-
* After running ```vagrant up``` the box is set up using Puppet
12-
* You should now have your working Symfony2 Standard Edition under http://localhost:8181/app_dev.php
13-
14-
Installed components
15-
--------------------
16-
17-
* [Nginx](http://nginx.org) using puppet module (https://github.com/example42/puppet-nginx)
18-
* [Apache](http://httpd.apache.org/) using puppet module (https://github.com/example42/puppet-apache)
19-
* [php-fpm](http://php-fpm.org) using puppet module (https://github.com/saz/puppet-php)
20-
* [git](http://git-scm.com/)
21-
* [pear](http://pear.php.net/) using puppet module (https://github.com/rafaelfelix/puppet-pear)
22-
* [Node.js](http://nodejs.org/)
23-
* [npm](http://npmjs.org/)
24-
* [less](http://lesscss.org/)
25-
* [Symfony2 Standard Edition](https://github.com/symfony/symfony-standard)
26-
* [MySQL](http://dev.mysql.com/downloads/mysql/) using puppet module (https://github.com/example42/puppet-mysql)
27-
* [MongoDB](http://www.mongodb.org/) using puppet module (https://github.com/puppetlabs/puppetlabs-mongodb)
28-
* [Capistrano](https://github.com/capistrano/capistrano)
29-
* [capifony](http://capifony.org/)
30-
* Most of the [phpqatools](http://www.phpqatools.org) using puppet module (https://github.com/rafaelfelix/puppet-phpqatools)
1+
Set up a PHP development box super fast
2+
=======================================
3+
4+
Installation
5+
------------
6+
7+
* Install vagrant using the installation instructions in the [Getting Started document](http://vagrantup.com/v1/docs/getting-started/index.html)
8+
* Add a Ubuntu Precise box using the [available official boxes](https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Boxes), for example: ```vagrant box add phpdevbox http://files.vagrantup.com/precise64.box``` (make sure it's named phpdevbox)
9+
* Clone this repository
10+
* Install submodules with ```git submodule update --init```
11+
* After running ```vagrant up``` the box is set up using Puppet
12+
* You should now have your working Symfony2 Standard Edition under http://localhost:8181/app_dev.php
13+
14+
Installed components
15+
--------------------
16+
17+
* [Nginx](http://nginx.org) using puppet module (https://github.com/example42/puppet-nginx)
18+
* [Apache](http://httpd.apache.org/) using puppet module (https://github.com/example42/puppet-apache)
19+
* [php-fpm](http://php-fpm.org) using puppet module (https://github.com/saz/puppet-php)
20+
* [git](http://git-scm.com/)
21+
* [pear](http://pear.php.net/) using puppet module (https://github.com/rafaelfelix/puppet-pear)
22+
* [Node.js](http://nodejs.org/)
23+
* [npm](http://npmjs.org/)
24+
* [less](http://lesscss.org/)
25+
* [Symfony2 Standard Edition](https://github.com/symfony/symfony-standard)
26+
* [MySQL](http://dev.mysql.com/downloads/mysql/) using puppet module (https://github.com/example42/puppet-mysql)
27+
* [MongoDB](http://www.mongodb.org/) using puppet module (https://github.com/puppetlabs/puppetlabs-mongodb)
28+
* [Capistrano](https://github.com/capistrano/capistrano)
29+
* [capifony](http://capifony.org/)
30+
* Most of the [phpqatools](http://www.phpqatools.org) using puppet module (https://github.com/rafaelfelix/puppet-phpqatools)

Vagrantfile

Lines changed: 106 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,106 @@
1-
# -*- mode: ruby -*-
2-
# vi: set ft=ruby :
3-
4-
Vagrant::Config.run do |config|
5-
# All Vagrant configuration is done here. The most common configuration
6-
# options are documented and commented below. For a complete reference,
7-
# please see the online documentation at vagrantup.com.
8-
9-
# Every Vagrant virtual environment requires a box to build off of.
10-
config.vm.box = "phpdevbox"
11-
12-
# The url from where the 'config.vm.box' box will be fetched if it
13-
# doesn't already exist on the user's system.
14-
# config.vm.box_url = "http://domain.com/path/to/above.box"
15-
16-
# Boot with a GUI so you can see the screen. (Default is headless)
17-
# config.vm.boot_mode = :gui
18-
19-
# Assign this VM to a host-only network IP, allowing you to access it
20-
# via the IP. Host-only networks can talk to the host machine as well as
21-
# any other machines on the same network, but cannot be accessed (through this
22-
# network interface) by any external networks.
23-
# config.vm.network :hostonly, "192.168.33.10"
24-
25-
# Assign this VM to a bridged network, allowing you to connect directly to a
26-
# network using the host's network device. This makes the VM appear as another
27-
# physical device on your network.
28-
# config.vm.network :bridged
29-
30-
# Forward a port from the guest to the host, which allows for outside
31-
# computers to access the VM, whereas host only networking does not.
32-
config.vm.forward_port 80, 8080 #apache
33-
config.vm.forward_port 81, 8181 #nginx
34-
config.vm.forward_port 27017, 27017 #mongodb
35-
config.vm.forward_port 3306, 3306 #mysql
36-
37-
# Share an additional folder to the guest VM. The first argument is
38-
# an identifier, the second is the path on the guest to mount the
39-
# folder, and the third is the path on the host to the actual folder.
40-
# config.vm.share_folder "v-data", "/vagrant_data", "../data"
41-
42-
# Enable provisioning with Puppet stand alone. Puppet manifests
43-
# are contained in a directory path relative to this Vagrantfile.
44-
# You will need to create the manifests directory and a manifest in
45-
# the file precise64.pp in the manifests_path directory.
46-
#
47-
# An example Puppet manifest to provision the message of the day:
48-
#
49-
# # group { "puppet":
50-
# # ensure => "present",
51-
# # }
52-
# #
53-
# # File { owner => 0, group => 0, mode => 0644 }
54-
# #
55-
# # file { '/etc/motd':
56-
# # content => "Welcome to your Vagrant-built virtual machine!
57-
# # Managed by Puppet.\n"
58-
# # }
59-
#
60-
config.vm.provision :puppet do |puppet|
61-
puppet.manifests_path = "puppet/manifests"
62-
puppet.module_path = "puppet/modules"
63-
puppet.options = ['--verbose']
64-
end
65-
66-
# Enable provisioning with chef solo, specifying a cookbooks path, roles
67-
# path, and data_bags path (all relative to this Vagrantfile), and adding
68-
# some recipes and/or roles.
69-
#
70-
# config.vm.provision :chef_solo do |chef|
71-
# chef.cookbooks_path = "../my-recipes/cookbooks"
72-
# chef.roles_path = "../my-recipes/roles"
73-
# chef.data_bags_path = "../my-recipes/data_bags"
74-
# chef.add_recipe "mysql"
75-
# chef.add_role "web"
76-
#
77-
# # You may also specify custom JSON attributes:
78-
# chef.json = { :mysql_password => "foo" }
79-
# end
80-
81-
# Enable provisioning with chef server, specifying the chef server URL,
82-
# and the path to the validation key (relative to this Vagrantfile).
83-
#
84-
# The Opscode Platform uses HTTPS. Substitute your organization for
85-
# ORGNAME in the URL and validation key.
86-
#
87-
# If you have your own Chef Server, use the appropriate URL, which may be
88-
# HTTP instead of HTTPS depending on your configuration. Also change the
89-
# validation key to validation.pem.
90-
#
91-
# config.vm.provision :chef_client do |chef|
92-
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
93-
# chef.validation_key_path = "ORGNAME-validator.pem"
94-
# end
95-
#
96-
# If you're using the Opscode platform, your validator client is
97-
# ORGNAME-validator, replacing ORGNAME with your organization name.
98-
#
99-
# IF you have your own Chef Server, the default validation client name is
100-
# chef-validator, unless you changed the configuration.
101-
#
102-
# chef.validation_client_name = "ORGNAME-validator"
103-
104-
# allow symlinks in vm
105-
config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
106-
end
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant::Config.run do |config|
5+
# All Vagrant configuration is done here. The most common configuration
6+
# options are documented and commented below. For a complete reference,
7+
# please see the online documentation at vagrantup.com.
8+
9+
# Every Vagrant virtual environment requires a box to build off of.
10+
config.vm.box = "phpdevbox"
11+
12+
# The url from where the 'config.vm.box' box will be fetched if it
13+
# doesn't already exist on the user's system.
14+
# config.vm.box_url = "http://domain.com/path/to/above.box"
15+
16+
# Boot with a GUI so you can see the screen. (Default is headless)
17+
# config.vm.boot_mode = :gui
18+
19+
# Assign this VM to a host-only network IP, allowing you to access it
20+
# via the IP. Host-only networks can talk to the host machine as well as
21+
# any other machines on the same network, but cannot be accessed (through this
22+
# network interface) by any external networks.
23+
# config.vm.network :hostonly, "192.168.33.10"
24+
25+
# Assign this VM to a bridged network, allowing you to connect directly to a
26+
# network using the host's network device. This makes the VM appear as another
27+
# physical device on your network.
28+
# config.vm.network :bridged
29+
30+
# Forward a port from the guest to the host, which allows for outside
31+
# computers to access the VM, whereas host only networking does not.
32+
config.vm.forward_port 80, 8080 #apache
33+
config.vm.forward_port 81, 8181 #nginx
34+
config.vm.forward_port 27017, 27017 #mongodb
35+
config.vm.forward_port 3306, 3306 #mysql
36+
37+
# Share an additional folder to the guest VM. The first argument is
38+
# an identifier, the second is the path on the guest to mount the
39+
# folder, and the third is the path on the host to the actual folder.
40+
# config.vm.share_folder "v-data", "/vagrant_data", "../data"
41+
42+
# Enable provisioning with Puppet stand alone. Puppet manifests
43+
# are contained in a directory path relative to this Vagrantfile.
44+
# You will need to create the manifests directory and a manifest in
45+
# the file precise64.pp in the manifests_path directory.
46+
#
47+
# An example Puppet manifest to provision the message of the day:
48+
#
49+
# # group { "puppet":
50+
# # ensure => "present",
51+
# # }
52+
# #
53+
# # File { owner => 0, group => 0, mode => 0644 }
54+
# #
55+
# # file { '/etc/motd':
56+
# # content => "Welcome to your Vagrant-built virtual machine!
57+
# # Managed by Puppet.\n"
58+
# # }
59+
#
60+
config.vm.provision :puppet do |puppet|
61+
puppet.manifests_path = "puppet/manifests"
62+
puppet.module_path = "puppet/modules"
63+
puppet.options = ['--verbose']
64+
end
65+
66+
# Enable provisioning with chef solo, specifying a cookbooks path, roles
67+
# path, and data_bags path (all relative to this Vagrantfile), and adding
68+
# some recipes and/or roles.
69+
#
70+
# config.vm.provision :chef_solo do |chef|
71+
# chef.cookbooks_path = "../my-recipes/cookbooks"
72+
# chef.roles_path = "../my-recipes/roles"
73+
# chef.data_bags_path = "../my-recipes/data_bags"
74+
# chef.add_recipe "mysql"
75+
# chef.add_role "web"
76+
#
77+
# # You may also specify custom JSON attributes:
78+
# chef.json = { :mysql_password => "foo" }
79+
# end
80+
81+
# Enable provisioning with chef server, specifying the chef server URL,
82+
# and the path to the validation key (relative to this Vagrantfile).
83+
#
84+
# The Opscode Platform uses HTTPS. Substitute your organization for
85+
# ORGNAME in the URL and validation key.
86+
#
87+
# If you have your own Chef Server, use the appropriate URL, which may be
88+
# HTTP instead of HTTPS depending on your configuration. Also change the
89+
# validation key to validation.pem.
90+
#
91+
# config.vm.provision :chef_client do |chef|
92+
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
93+
# chef.validation_key_path = "ORGNAME-validator.pem"
94+
# end
95+
#
96+
# If you're using the Opscode platform, your validator client is
97+
# ORGNAME-validator, replacing ORGNAME with your organization name.
98+
#
99+
# IF you have your own Chef Server, the default validation client name is
100+
# chef-validator, unless you changed the configuration.
101+
#
102+
# chef.validation_client_name = "ORGNAME-validator"
103+
104+
# allow symlinks in vm
105+
config.vm.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
106+
end

conf/nginx/default

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
server {
2-
listen 81;
3-
server_name localhost;
4-
access_log /var/log/nginx/localhost.access.log;
5-
error_log /var/log/nginx/localhost.error.log error;
6-
7-
# strip app.php/ prefix if it is present
8-
rewrite ^/app\.php/?(.*)$ /$1 permanent;
9-
10-
## Default location
11-
location / {
12-
root /vagrant/www/symfony/web;
13-
index app.php;
14-
try_files $uri @rewriteapp;
15-
}
16-
17-
location @rewriteapp {
18-
rewrite ^(.*)$ /app.php/$1 last;
19-
}
20-
21-
## Images and static content is treated different
22-
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
23-
access_log off;
24-
expires 30d;
25-
root /vagrant/www/symfony/web;
26-
}
27-
28-
## Parse all .php file in the /vagrant/www/symfony/web directory
29-
location ~ ^/(app|app_dev)\.php(/|$) {
30-
root /vagrant/www/symfony/web;
31-
fastcgi_split_path_info ^(.+\.php)(.*)$;
32-
fastcgi_pass backend;
33-
fastcgi_index index.php;
34-
fastcgi_param SCRIPT_FILENAME /vagrant/www/symfony/web$fastcgi_script_name;
35-
include fastcgi_params;
36-
fastcgi_param QUERY_STRING $query_string;
37-
fastcgi_param REQUEST_METHOD $request_method;
38-
fastcgi_param CONTENT_TYPE $content_type;
39-
fastcgi_param CONTENT_LENGTH $content_length;
40-
fastcgi_intercept_errors on;
41-
fastcgi_ignore_client_abort off;
42-
fastcgi_connect_timeout 60;
43-
fastcgi_send_timeout 180;
44-
fastcgi_read_timeout 180;
45-
fastcgi_buffer_size 128k;
46-
fastcgi_buffers 4 256k;
47-
fastcgi_busy_buffers_size 256k;
48-
fastcgi_temp_file_write_size 256k;
49-
}
50-
51-
## Disable viewing .htaccess & .htpassword
52-
location ~ /\.ht {
53-
deny all;
54-
}
55-
}
56-
57-
## php-fpm backend
58-
upstream backend {
59-
server 127.0.0.1:9000;
60-
}
1+
server {
2+
listen 81;
3+
server_name localhost;
4+
access_log /var/log/nginx/localhost.access.log;
5+
error_log /var/log/nginx/localhost.error.log error;
6+
7+
# strip app.php/ prefix if it is present
8+
rewrite ^/app\.php/?(.*)$ /$1 permanent;
9+
10+
## Default location
11+
location / {
12+
root /vagrant/www/symfony/web;
13+
index app.php;
14+
try_files $uri @rewriteapp;
15+
}
16+
17+
location @rewriteapp {
18+
rewrite ^(.*)$ /app.php/$1 last;
19+
}
20+
21+
## Images and static content is treated different
22+
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
23+
access_log off;
24+
expires 30d;
25+
root /vagrant/www/symfony/web;
26+
}
27+
28+
## Parse all .php file in the /vagrant/www/symfony/web directory
29+
location ~ ^/(app|app_dev)\.php(/|$) {
30+
root /vagrant/www/symfony/web;
31+
fastcgi_split_path_info ^(.+\.php)(.*)$;
32+
fastcgi_pass backend;
33+
fastcgi_index index.php;
34+
fastcgi_param SCRIPT_FILENAME /vagrant/www/symfony/web$fastcgi_script_name;
35+
include fastcgi_params;
36+
fastcgi_param QUERY_STRING $query_string;
37+
fastcgi_param REQUEST_METHOD $request_method;
38+
fastcgi_param CONTENT_TYPE $content_type;
39+
fastcgi_param CONTENT_LENGTH $content_length;
40+
fastcgi_intercept_errors on;
41+
fastcgi_ignore_client_abort off;
42+
fastcgi_connect_timeout 60;
43+
fastcgi_send_timeout 180;
44+
fastcgi_read_timeout 180;
45+
fastcgi_buffer_size 128k;
46+
fastcgi_buffers 4 256k;
47+
fastcgi_busy_buffers_size 256k;
48+
fastcgi_temp_file_write_size 256k;
49+
}
50+
51+
## Disable viewing .htaccess & .htpassword
52+
location ~ /\.ht {
53+
deny all;
54+
}
55+
}
56+
57+
## php-fpm backend
58+
upstream backend {
59+
server 127.0.0.1:9000;
60+
}

0 commit comments

Comments
 (0)