Alex Monk has uploaded a new change for review.
https://gerrit.wikimedia.org/r/265642
Change subject: mediawiki: Move www.wikimedia.org portal into wwwportals
......................................................................
mediawiki: Move www.wikimedia.org portal into wwwportals
And change ServerName/ServerAlias to use the domain_suffix variable for beta.
Change-Id: I47750132852b40c22a743213ae7dafaa93795b62
---
M modules/mediawiki/files/apache/sites/wikimedia.conf
M modules/mediawiki/templates/apache/sites/wwwportals.conf.erb
2 files changed, 39 insertions(+), 40 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/42/265642/1
diff --git a/modules/mediawiki/files/apache/sites/wikimedia.conf
b/modules/mediawiki/files/apache/sites/wikimedia.conf
index 5240943..e1b6744 100644
--- a/modules/mediawiki/files/apache/sites/wikimedia.conf
+++ b/modules/mediawiki/files/apache/sites/wikimedia.conf
@@ -115,44 +115,4 @@
Include "sites-enabled/wikimedia-common.incl"
</VirtualHost>
-# wikimedia.org
-<VirtualHost *:80>
- DocumentRoot "/srv/mediawiki/docroot/wwwportal"
- # bare wikimedia.org is in redirects.dat
- ServerName www.wikimedia.org
- ServerAlias *.wikimedia.org # FIXME: Should this still be here?
-
- RewriteEngine On
- RewriteRule . - [E=RW_PROTO:%{HTTP:X-Forwarded-Proto}]
- RewriteCond %{ENV:RW_PROTO} !=https
- RewriteRule . - [E=RW_PROTO:http]
-
- # Main page portal
- RewriteRule ^/$ /portal/wikimedia.org/index.html [L]
- <Location "^/$|^/portal/">
- Header set Cache-Control "s-maxage=3600, must-revalidate, max-age=0"
- </Location>
-
- # Redirects for country portals from the old URLs
- RewriteRule ^/ch-portal/?$ http://wikipedia.ch/ [R=301,L]
- RewriteRule ^/be-portal/?$ http://wikipedia.be/ [R=301,L]
- RewriteRule ^/nl-portal/?$ http://wikipedia.nl/ [R=301,L]
-
- AddDefaultCharset Off
- ExpiresActive On
-
- # Redirect wiki which was previously at this location
- RewriteRule ^/wiki/(.*)$ %{ENV:RW_PROTO}://wikimediafoundation.org/wiki/$1
[R=301,L]
-
- # /api/ rewrites
- Include "sites-enabled/api-rewrites.incl"
-
- <Directory "/srv/mediawiki/docroot/wwwportal/w">
- <IfModule mod_php5.c>
- php_admin_flag engine on
- </IfModule>
- </Directory>
-
-</VirtualHost>
-
# vim: sts=4 sw=4 syn=apache autoindent
diff --git a/modules/mediawiki/templates/apache/sites/wwwportals.conf.erb
b/modules/mediawiki/templates/apache/sites/wwwportals.conf.erb
index ce56555..d5f7747 100644
--- a/modules/mediawiki/templates/apache/sites/wwwportals.conf.erb
+++ b/modules/mediawiki/templates/apache/sites/wwwportals.conf.erb
@@ -244,4 +244,43 @@
RewriteRule ^(.*)$ %{ENV:RW_PROTO}://en.wikivoyage.<%= @domain_suffix %>$1
[R=301,L]
</VirtualHost>
+<VirtualHost *:80>
+ DocumentRoot "/srv/mediawiki/docroot/wwwportal"
+ # bare wikimedia.org is in redirects.dat
+ ServerName www.wikimedia.<%= @domain_suffix %>
+ ServerAlias *.wikimedia.<%= @domain_suffix %> # FIXME: Should this still
be here?
+
+ RewriteEngine On
+ RewriteRule . - [E=RW_PROTO:%{HTTP:X-Forwarded-Proto}]
+ RewriteCond %{ENV:RW_PROTO} !=https
+ RewriteRule . - [E=RW_PROTO:http]
+
+ # Main page portal
+ RewriteRule ^/$ /portal/wikimedia.org/index.html [L]
+ <Location "^/$|^/portal/">
+ Header set Cache-Control "s-maxage=3600, must-revalidate, max-age=0"
+ </Location>
+
+ # Redirects for country portals from the old URLs
+ RewriteRule ^/ch-portal/?$ http://wikipedia.ch/ [R=301,L]
+ RewriteRule ^/be-portal/?$ http://wikipedia.be/ [R=301,L]
+ RewriteRule ^/nl-portal/?$ http://wikipedia.nl/ [R=301,L]
+
+ AddDefaultCharset Off
+ ExpiresActive On
+
+ # Redirect wiki which was previously at this location
+ RewriteRule ^/wiki/(.*)$ %{ENV:RW_PROTO}://wikimediafoundation.org/wiki/$1
[R=301,L]
+
+ # /api/ rewrites
+ Include "sites-enabled/api-rewrites.incl"
+
+ <Directory "/srv/mediawiki/docroot/wwwportal/w">
+ <IfModule mod_php5.c>
+ php_admin_flag engine on
+ </IfModule>
+ </Directory>
+
+</VirtualHost>
+
# vim: sts=4 sw=4 syn=apache autoindent
--
To view, visit https://gerrit.wikimedia.org/r/265642
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I47750132852b40c22a743213ae7dafaa93795b62
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits