Permalink
Browse files

extending the vagrant functionality to include the API as well as the…

… website
  • Loading branch information...
1 parent 6fafba8 commit 6666dc4c15b3d166226c82cdbf8f3832afceea21 @lornajane lornajane committed Apr 29, 2012
Showing with 30 additions and 0 deletions.
  1. +7 −0 puppet/manifests/joindin.pp
  2. +23 −0 puppet/templates/vhost.conf.erb
@@ -101,6 +101,13 @@
before => Notify['running'],
}
+# Set database config for application
+file { 'api-database-config':
+ path => '/vagrant/src/api-v2/database.php',
+ source => '/vagrant/puppet/templates/database.php.erb',
+ before => Notify['running'],
+}
+
# Announce success message
notify { 'running':
message => "Visit http://${host}:8080 in your browser.",
@@ -25,3 +25,26 @@
</Directory>
</VirtualHost>
+
+<VirtualHost *:<%= port %>>
+ DocumentRoot <%= docroot %>/api-v2/public/
+ ServerName api.<%= name %>
+
+ ErrorLog <%= scope.lookupvar('apache::log_dir') %>/<%= name %>-error_log
+ CustomLog <%= scope.lookupvar('apache::log_dir') %>/<%= name %>-access_log common
+ SetEnv JOINDIN_DEBUG on
+
+ <Directory <%= docroot %>>
+ <IfModule mod_rewrite.c>
+ Options +FollowSymLinks
+ </IfModule>
+
+ Options +Indexes +ExecCGI
+ DirectoryIndex index.php
+ AllowOverride All
+
+ Order allow,deny
+ Allow from all
+ </Directory>
+
+</VirtualHost>

0 comments on commit 6666dc4

Please sign in to comment.