Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/57696


Change subject: Make shared data accessible under a single sharepoint
......................................................................

Make shared data accessible under a single sharepoint

Vagrant 1.1.5 disallows mounting a share (or subtree of a share) under two
different mountpoints. I was using that as a trick to work around flakiness
on Windows when symlinking /var/www/w -> /mediawiki/vagrant. This change
removes both the workaround and the need for a symlink via a couple of
mod_rewrite directives.

The multiple mountpoint thing was also blocking using NFS on Linux / OS X
hosts, so I'll do that next.

Change-Id: I9aab2fec5bf8147b7cf25df430dab0fcd740d55b
---
M Vagrantfile
M puppet/manifests/site.pp
M puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
3 files changed, 13 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/96/57696/1

diff --git a/Vagrantfile b/Vagrantfile
index dbadedf..4b2d34c 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -46,12 +46,6 @@
         group: 'www-data',
         extra: 'dmode=770,fmode=770'
 
-    config.vm.synced_folder 'mediawiki', '/var/www/w',
-        owner: 'vagrant',
-        group: 'www-data',
-        extra: 'dmode=770,fmode=770',
-        create: true
-
     config.vm.provider :virtualbox do |vb|
         # See http://www.virtualbox.org/manual/ch08.html for additional 
options.
         vb.customize ['modifyvm', :id, '--memory', '512', '--ostype', 
'Ubuntu_64']
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp
index 804ab86..4301484 100644
--- a/puppet/manifests/site.pp
+++ b/puppet/manifests/site.pp
@@ -13,6 +13,12 @@
        group => 'root',
 }
 
+if ( $::virtualbox_version ) {
+       notice("Detected VirtualBox version ${::virtualbox_version}")
+} else {
+       warning('Could not determine VirtualBox version.')
+}
+
 exec { 'update-package-index':
        # run 'apt-get update', but no more than once every 24h
        command => 'apt-get update',
diff --git a/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb 
b/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
index 1751037..251b83a 100644
--- a/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
+++ b/puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
@@ -10,24 +10,20 @@
     </Directory>
 
     <Directory /var/www/>
-        Options Indexes FollowSymLinks MultiViews
-        AllowOverride None
-        Order allow,deny
-        allow from all
     </Directory>
 
     <Directory /vagrant/mediawiki/>
-        AllowOverride All
-        Order allow,deny
-        allow from all
+        # See <https://github.com/mitchellh/vagrant/issues/351>.
+        EnableSendfile Off
     </Directory>
 
     AllowEncodedSlashes on
-    RewriteEngine On
 
-    Alias /wiki /var/www/w/index.php
-    RewriteRule ^/$ /w/index.php
-    RewriteRule ^/w/$ /w/index.php
+    RewriteEngine On
+    RewriteRule ^/$ /w/index.php [R=301]
+
+    Alias /wiki "/vagrant/mediawiki/index.php"
+    Alias /w "/vagrant/mediawiki"
 
     ErrorLog "/vagrant/logs/apache-error.log"
     LogLevel error

-- 
To view, visit https://gerrit.wikimedia.org/r/57696
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9aab2fec5bf8147b7cf25df430dab0fcd740d55b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to