Ensure that {{ic|php-fpm}} is installed, and in your {{ic|/etc/nginx/nginx.conf}} file, ensure that you have an {{ic|upstream}} directive named {{ic|php}}, similar to this one:

+

Ensure that {{Pkg|php-fpm}} is installed, and in your {{ic|/etc/nginx/nginx.conf}} file, ensure that you have an {{ic|upstream}} directive named {{ic|php}}, similar to this one:

{{hc|/etc/nginx/nginx.conf|<nowiki>

{{hc|/etc/nginx/nginx.conf|<nowiki>

Line 77:

Line 90:

root /usr/share/webapps/mediawiki;

root /usr/share/webapps/mediawiki;

index index.php;

index index.php;

+

charset utf-8;

+

# For correct file uploads

+

client_max_body_size 100m; # Equal or more than upload_max_filesize in /etc/php/php.ini

+

client_body_timeout 60;

include mediawiki.conf;

include mediawiki.conf;

+

}

}

}}

}}

+

==== Lighttpd ====

==== Lighttpd ====

−

You should have [[Lighttpd]] installed and configured. Append to the lighttpd configuration file the following lines

+

You should have [[Lighttpd]] installed and configured. "mod_alias" and "mod_rewrite" in server.modules array of lighttpd is required. Append to the lighttpd configuration file the following lines

{{hc|/etc/lighttpd/lighttpd.conf|<nowiki>

{{hc|/etc/lighttpd/lighttpd.conf|<nowiki>

alias.url += ("/mediawiki" => "/usr/share/webapps/mediawiki/")

alias.url += ("/mediawiki" => "/usr/share/webapps/mediawiki/")

Line 91:

Line 110:

</nowiki>}}

</nowiki>}}

[[Daemons|Restart]] the {{ic|lighttpd.service}} daemon.

[[Daemons|Restart]] the {{ic|lighttpd.service}} daemon.

+

=== LocalSettings.php ===

=== LocalSettings.php ===

Open the wiki url (is {{ic|http://''your_server''/mediawiki/}}) in a browser and do the initial setup to create {{ic|LocalSettings.php}}. Then save it to {{ic|/usr/share/webapps/mediawiki/LocalSettings.php}}.

Open the wiki url (is {{ic|http://''your_server''/mediawiki/}}) in a browser and do the initial setup to create {{ic|LocalSettings.php}}. Then save it to {{ic|/usr/share/webapps/mediawiki/LocalSettings.php}}.

Line 97:

Line 117:

=== Mathematics (texvc) ===

=== Mathematics (texvc) ===

−

Usually installing texvc package and enabling it in config are enough:

+

Usually installing {{Pkg|texvc}} and enabling it in the config are enough:

{{bc|1=$wgUseTeX = true;}}

{{bc|1=$wgUseTeX = true;}}

Line 107:

Line 127:

$wgMaxShellTime = 300;

$wgMaxShellTime = 300;

</nowiki>}}

</nowiki>}}

+

=== Unicode ===

=== Unicode ===

Check that php, apache and mysql uses UTF-8. Otherwise you may face strange bugs because of encoding mismatch.

Check that php, apache and mysql uses UTF-8. Otherwise you may face strange bugs because of encoding mismatch.

Revision as of 09:31, 10 September 2013

Note: If you are using xampp, instead of LAMP, there are different steps you need to take after installing. More info here

Then, still on /etc/php/php.ini, look for the Dynamic Extensions section and uncomment ;extension=gd.so, uncomment ;extension=intl.so and add extension=xcache.so.

Now do the steps corresponding to your web server.

Web server

Apache

Create /etc/webapps/mediawiki/httpd-mediawiki.conf from the provided example apache.example.conf in the same directory. Edit it to remove the php_admin_value open_basedir line, which is already in php.ini.