Manual:Short URL/Page title - nginx, Root Access, PHP as a CGI module/ru

Данная конфигурация


 * Подтверждено, что данная конфигурация работает и была протестирована на версиях MediaWiki с 1.21 по 1.27.
 * Этот короткий формат URL-адреса был тщательно протестирован в течение двух лет в общедоступной среде. Он также был адаптирован для использования в рамках вики-фермы Gamepedia.
 * Is designed for an Ubuntu Linux distribution. It should work under other Linux distributions with minor tweaking.  It should work in Windows as well with more tweaking to the folder paths.
 * The wiki is installed in the root html/http directory. Example:   or   for other Linux distributions.
 * Pages will be accessed at .  This will also work as   as any subdomain should work under the server_name directive and a minor tweak to LocalSettings.php.
 * Page can still be accessed with .  This is great since if your wiki has been up previously old search engine links and bookmarks will continue to work.
 * Viewing  files and similar with a period in the name will work with this setup.
 * Static files will be served with max expiration header to reduce load on the server.
 * This configuration will work with  and other files stuck in the root directory.  This script checks for the existence of the file to serve directly before passing the URI request off to MediaWiki.

nginx configuration
The following nginx configuration can be added directly into the  file for a server hosting one site or into a   file setup for a server with multiple sites. Make sure to change the, the  , and access/error log file names.


 * Edit the LocalSettings.php file in the root html directory and add/update these settings:

If you added the configuration into a sites-available configuration folder make sure to create the symlink into the sites-enabled folder. Reload your nginx configuration by typing:  reload