[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Renamed entry points and make them inactive when directly ca...

2016-08-10 Thread Seb35 (Code Review)
Seb35 has submitted this change and it was merged.

Change subject: Renamed entry points and make them inactive when directly 
called from their normal directory
..


Renamed entry points and make them inactive when directly called from their 
normal directory

These entry points are only useful in the case of a multiversion installation; 
so
as a classical MediaWiki extension, they must be disabled to avoid any security 
issue.

Updated doc installation accordingly

The directory /www is still git-ignored but the entry points inside are forced 
to be
version-controled. This allows to version-control independently the directory 
/www, e.g.
for 404 error pages.

Change-Id: I7d712efa2b1bfc5ae61a342b61aeb66ccda797db
---
M .gitignore
M docs/installation.rst
R www/api.php
R www/img_auth.php
R www/index.php
R www/load.php
R www/opensearch_desc.php
7 files changed, 44 insertions(+), 32 deletions(-)

Approvals:
  Seb35: Verified; Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index f3b03ea..c7edd77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,5 +9,8 @@
 /node_modules
 /vendor
 
-# Installation
+# Web access for multiversion farms
+# You can put e.g. dedicated 404 error pages in addition of entry points
+# If you want to version-control this subdirectory with git, you can – in this 
case
+# add /index.php and others in its .gitignore to avoid double version-control.)
 /www
diff --git a/docs/installation.rst b/docs/installation.rst
index cc01dab..3571208 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -13,14 +13,14 @@
 Preparation
 ===
 
-It is out of scope to explain out to install and configure the full HTTP 
stack, neither how to make it compatible with a MediaWiki farm and evolve with 
the time. For a raw overview, you must configure in a multisite fashion: the 
DNS servers, the HTTP servers, and possibly the associated security versions 
DNSSEC and HTTPS, and possibly the domain names depending of your specific 
configuration. It is also out of scope the installation and configuration of 
other services and backends: database servers, memcached servers, other caching 
or performance services, MediaWiki external services as Parsoid, Mathoid, 
Citoid, etc. You should also be comfortable with command line on a *nix system.
+It is out of scope to explain out to install and configure the full HTTP 
stack, neither how to make it compatible with a MediaWiki farm and evolve with 
the time. For a raw overview, you must configure in a multisite fashion: the 
DNS servers, the HTTP servers, and possibly the associated security versions 
DNSSEC and HTTPS, and possibly the domain names depending of your specific 
configuration. It is also out of scope the installation and configuration of 
other services and backends: database servers, memcached servers, other caching 
or performance services, MediaWiki external services as Parsoid, Mathoid, 
Citoid, etc. You should also be comfortable with command line on a \*nix system.
 
 It is assumed you have an existing MediaWiki (standalone) installation. A new 
installation is theoretically possible, but it has not been tested.
 
 Before installing the files, you must prepare these informations:
 * regular expression(s) for your farm(s) with named patterns;
 * *configuration directory* where will be placed MediaWiki configurations, the 
default is :path:`/etc/mediawiki`;
-* *cache directory*, a directory where config files will be cached; the 
default is :path:`/tmp/mw-cache`; it can speed up MediaWikiFarm from 9ms to 2ms.
+* *cache directory*, a directory where config files will be cached; the 
default is :path:`/tmp/mw-cache`; it can speed up MediaWikiFarm from 9ms to 2ms 
(without OpCache).
 
 For your initial configuration, you can choose the regular expression of your 
farm simply as the name of your existing wiki, e.g. "mywiki\.example\.org". If 
you do that, the suffix and wikiID can be fixed without variables, but you 
should quickly think how you want to organise your wikis and farms to change 
these to significant values before you have too much things in your config 
files.
 
@@ -40,27 +40,26 @@
 1. Copy the extension MediaWikiFarm and install it in the subdirectory 
:path:`$IP/extensions/MediaWikiFarm`;
 2. If you downloaded it from Git and want the YAML syntax, go inside the 
directory and run :command:`composer install --no-dev` (see Composer_ if 
needed);
 3. Copy your existing :path:`LocalSettings.php` file in your configuration 
directory;
-4. Verify there is no absolute path inside: ``__FILE__`` and ``__DIR__`` must 
be replaced by their original value to avoid any missing file require (it’s 
fine to use the MediaWiki installation variable :path:`$IP`);
+4. Verify there is no absolute path inside: ``__FILE__`` and ``__DIR__`` 
should probably be replaced by their original value to avoid any missing file 
require (it’s fine to use the MediaWiki 

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Renamed entry points and make them inactive when directly ca...

2016-08-10 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review.

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

Change subject: Renamed entry points and make them inactive when directly 
called from their normal directory
..

Renamed entry points and make them inactive when directly called from their 
normal directory

These entry points are only useful in the case of a multiversion installation; 
so
as a classical MediaWiki extension, they must be disabled to avoid any security 
issue.

Updated doc installation accordingly

The directory /www is still git-ignored but the entry points inside are forced 
to be
version-controled. This allows to version-control independently the directory 
/www, e.g.
for 404 error pages.

Change-Id: I7d712efa2b1bfc5ae61a342b61aeb66ccda797db
---
M .gitignore
M docs/installation.rst
R www/api.php
R www/img_auth.php
R www/index.php
R www/load.php
R www/opensearch_desc.php
7 files changed, 44 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiFarm 
refs/changes/45/304045/1

diff --git a/.gitignore b/.gitignore
index f3b03ea..c7edd77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,5 +9,8 @@
 /node_modules
 /vendor
 
-# Installation
+# Web access for multiversion farms
+# You can put e.g. dedicated 404 error pages in addition of entry points
+# If you want to version-control this subdirectory with git, you can – in this 
case
+# add /index.php and others in its .gitignore to avoid double version-control.)
 /www
diff --git a/docs/installation.rst b/docs/installation.rst
index cc01dab..3571208 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -13,14 +13,14 @@
 Preparation
 ===
 
-It is out of scope to explain out to install and configure the full HTTP 
stack, neither how to make it compatible with a MediaWiki farm and evolve with 
the time. For a raw overview, you must configure in a multisite fashion: the 
DNS servers, the HTTP servers, and possibly the associated security versions 
DNSSEC and HTTPS, and possibly the domain names depending of your specific 
configuration. It is also out of scope the installation and configuration of 
other services and backends: database servers, memcached servers, other caching 
or performance services, MediaWiki external services as Parsoid, Mathoid, 
Citoid, etc. You should also be comfortable with command line on a *nix system.
+It is out of scope to explain out to install and configure the full HTTP 
stack, neither how to make it compatible with a MediaWiki farm and evolve with 
the time. For a raw overview, you must configure in a multisite fashion: the 
DNS servers, the HTTP servers, and possibly the associated security versions 
DNSSEC and HTTPS, and possibly the domain names depending of your specific 
configuration. It is also out of scope the installation and configuration of 
other services and backends: database servers, memcached servers, other caching 
or performance services, MediaWiki external services as Parsoid, Mathoid, 
Citoid, etc. You should also be comfortable with command line on a \*nix system.
 
 It is assumed you have an existing MediaWiki (standalone) installation. A new 
installation is theoretically possible, but it has not been tested.
 
 Before installing the files, you must prepare these informations:
 * regular expression(s) for your farm(s) with named patterns;
 * *configuration directory* where will be placed MediaWiki configurations, the 
default is :path:`/etc/mediawiki`;
-* *cache directory*, a directory where config files will be cached; the 
default is :path:`/tmp/mw-cache`; it can speed up MediaWikiFarm from 9ms to 2ms.
+* *cache directory*, a directory where config files will be cached; the 
default is :path:`/tmp/mw-cache`; it can speed up MediaWikiFarm from 9ms to 2ms 
(without OpCache).
 
 For your initial configuration, you can choose the regular expression of your 
farm simply as the name of your existing wiki, e.g. "mywiki\.example\.org". If 
you do that, the suffix and wikiID can be fixed without variables, but you 
should quickly think how you want to organise your wikis and farms to change 
these to significant values before you have too much things in your config 
files.
 
@@ -40,27 +40,26 @@
 1. Copy the extension MediaWikiFarm and install it in the subdirectory 
:path:`$IP/extensions/MediaWikiFarm`;
 2. If you downloaded it from Git and want the YAML syntax, go inside the 
directory and run :command:`composer install --no-dev` (see Composer_ if 
needed);
 3. Copy your existing :path:`LocalSettings.php` file in your configuration 
directory;
-4. Verify there is no absolute path inside: ``__FILE__`` and ``__DIR__`` must 
be replaced by their original value to avoid any missing file require (it’s 
fine to use the MediaWiki installation variable :path:`$IP`);
+4. Verify there is no absolute path inside: ``__FILE__`` and ``__DIR__`` 
should probably be replaced by their original