Difference between revisions of "User:Aeric/Configuration"
From AgileApps Support Wiki
imported>Aeric (Created page with "<noinclude>__TOC__</noinclude> ===How the Wiki Works=== :* Mediawiki consists of a database and a bunch of PHP scripts and supporting files in the Wiki directory. :* The actual W…") |
imported>Aeric m (Text replace - 'agileappslive' to 'agileappscloud') |
||
(55 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude>__TOC__</noinclude> | <noinclude>__TOC__</noinclude> | ||
=== | ===Configuration Notes=== | ||
:* | :* The wiki is hosted at Rackspace. | ||
:* The | :* The server can be accessed with a VPN connection, using either FTP or SSH. | ||
: | :: FTP gives access to all of the Wiki files, which is generally sufficient. | ||
: | :: (Access details are in emails.) | ||
:* | :* DNS entries that point to the server are <tt>agileappscloud.info</tt> and <tt>platformatyourservice.com</tt>. | ||
:* Location of any given wiki is /usr/share/mediawiki/{wikiName} | |||
:* | :* Multiple subdomains are set up using Apache, the DNS server, and <tt>LocalSettings.php</tt>. | ||
:* | :* The DNS entries determine which subdomains are known to the world. | ||
:* | :* The wiki name in the url determines which wiki is accessed. (E.g. <tt>/wiki</tt>) | ||
:* | :* The <tt>LocalSettings.php</tt> file in that wiki uses the subdomain to determine which skin is used. | ||
:* The skin determines which logo is shown, which platform name to use, and the settings for several other variables, including the site name. | |||
;Organization of the mediawiki.conf Configuration File: | |||
( | :* There are two <tt><VirtualHost></tt> sections, one for each virtual server:<br>(<tt>agileappscloud.info</tt> and <tt>platformatservice.com</tt>). | ||
:* Inside each virtual host, there is a <tt><Directory></tt> section for each wiki that can be accessed, as well as an <tt>Alias</tt> setting that maps the <tt>{domain}/xyz</tt> URL to the <tt>/usr/share/mediawiki/xyz</tt> wiki folder. | |||
: | :* In the AgileAppsLive domain, the "/wiki" alias points to the <tt>aawiki</tt> wiki, as does the "/aawiki" alias. | ||
: | :* When <tt>scripts/versionProductionWiki</tt> is run to make a versioned copy of the production wiki, a new directory-section and alias are created for it. E.g. "aa90". | ||
: | :* Each <tt><Directory></tt> contains a number of URL rewrites that are needed to make the wiki work properly. Unfortunately, they need to be copied for each directory. | ||
:: | ::* Attempts to do global rewrites failed, as recorded in notes at the top of the file. However, the rewrites were ''not'' attempted inside the <tt><VirtualHost></tt> headings, as those came later. | ||
:: | ::* So it is possible that a clever configuration could cut down the size of the <tt><Directory></tt> segments. | ||
:: | ::* But, as the notes in the file attest, the Apache rewrites frequently do not work as documented--so the actual semantics must be discovered by trial and error. (A rainy day project for sure, not worth the time given that we have a working system.) | ||
: | ===Configuring Apache=== | ||
:* The Apache configuration file is <tt>/etc/httpd/conf.d/mediawiki.conf</tt>. | |||
:* Always preserve the original and edit a copy in <tt>/usr/share/mediawiki/apache_config</tt> | |||
: | :* To edit, either: | ||
: | ::# SSH to the server using PuTTY or the SSH shell, and use a line-oriented editor like nano. | ||
::# Use FTP to bring the file back to your workstation, and use a terrific editor like NotePad++ | |||
===Maintenance Scripts=== | |||
To use these scripts: | |||
# Using PuTTY, log in to Rackspace | |||
# <tt>cd /usr/share/mediawiki/apache_config</tt> | |||
Scripts: | |||
: | :* <tt>./get_conf</tt> | ||
:: Gets a copy of the three main configuration files, primarily for backup: | |||
::: <tt>httpd.conf</tt> | |||
::: <tt>phpMyAdmin.conf</tt> | |||
::: <tt>mediawiki.conf</tt> | |||
:* | :* <tt>./try_setup</tt> | ||
: | :: Copies the current config file as <tt>mediawiki.conf_sav</tt>. | ||
: | :: If no else is editing mediawiki.conf, then <tt>mediawiki.conf_new</tt> has the same content, and is ready to be edited. Otherwise, copy <tt>_sav</tt> to <tt>_new</tt> before you begin. | ||
:* | :* <tt>./try</tt> | ||
:: Put <tt>mediawiki.conf_new</tt> in place and restart the server. | |||
:: For a quick test, refresh the page for each of the main wikis: | |||
:::* http://agileappscloud.info/wiki | |||
:::* http://agileappscloud.info/aadev | |||
:::* http://lj.platformatyourservice.com/wiki | |||
:: If you can see the page and the generated links are correct, the wiki is usable. | |||
:: If you've done any work on the skins, then test the changes, as well | |||
:* | :* <tt>./revert</tt> | ||
: | :: Put <tt>mediawiki.conf_sav</tt> back in place, in case the _new version didn't work. | ||
: | |||
;Apache References: | |||
: | |||
:* http://net.tutsplus.com/tutorials/other/a-deeper-look-at-mod_rewrite-for-apache/ | :* http://net.tutsplus.com/tutorials/other/a-deeper-look-at-mod_rewrite-for-apache/ | ||
:* http://www.addedbytes.com/download/regular-expressions-cheat-sheet-v2/png | :* http://www.addedbytes.com/download/regular-expressions-cheat-sheet-v2/png | ||
:* http://www.addedbytes.com/cheat-sheets/mod_rewrite-cheat-sheet/ | :* http://www.addedbytes.com/cheat-sheets/mod_rewrite-cheat-sheet/ | ||
Latest revision as of 23:56, 14 August 2015
Configuration Notes
- The wiki is hosted at Rackspace.
- The server can be accessed with a VPN connection, using either FTP or SSH.
- FTP gives access to all of the Wiki files, which is generally sufficient.
- (Access details are in emails.)
- DNS entries that point to the server are agileappscloud.info and platformatyourservice.com.
- Location of any given wiki is /usr/share/mediawiki/{wikiName}
- Multiple subdomains are set up using Apache, the DNS server, and LocalSettings.php.
- The DNS entries determine which subdomains are known to the world.
- The wiki name in the url determines which wiki is accessed. (E.g. /wiki)
- The LocalSettings.php file in that wiki uses the subdomain to determine which skin is used.
- The skin determines which logo is shown, which platform name to use, and the settings for several other variables, including the site name.
- Organization of the mediawiki.conf Configuration File
-
- There are two <VirtualHost> sections, one for each virtual server:
(agileappscloud.info and platformatservice.com).
- There are two <VirtualHost> sections, one for each virtual server:
- Inside each virtual host, there is a <Directory> section for each wiki that can be accessed, as well as an Alias setting that maps the {domain}/xyz URL to the /usr/share/mediawiki/xyz wiki folder.
- In the AgileAppsLive domain, the "/wiki" alias points to the aawiki wiki, as does the "/aawiki" alias.
- When scripts/versionProductionWiki is run to make a versioned copy of the production wiki, a new directory-section and alias are created for it. E.g. "aa90".
- Each <Directory> contains a number of URL rewrites that are needed to make the wiki work properly. Unfortunately, they need to be copied for each directory.
- Attempts to do global rewrites failed, as recorded in notes at the top of the file. However, the rewrites were not attempted inside the <VirtualHost> headings, as those came later.
- So it is possible that a clever configuration could cut down the size of the <Directory> segments.
- But, as the notes in the file attest, the Apache rewrites frequently do not work as documented--so the actual semantics must be discovered by trial and error. (A rainy day project for sure, not worth the time given that we have a working system.)
Configuring Apache
- The Apache configuration file is /etc/httpd/conf.d/mediawiki.conf.
- Always preserve the original and edit a copy in /usr/share/mediawiki/apache_config
- To edit, either:
- SSH to the server using PuTTY or the SSH shell, and use a line-oriented editor like nano.
- Use FTP to bring the file back to your workstation, and use a terrific editor like NotePad++
Maintenance Scripts
To use these scripts:
- Using PuTTY, log in to Rackspace
- cd /usr/share/mediawiki/apache_config
Scripts:
- ./get_conf
- Gets a copy of the three main configuration files, primarily for backup:
- httpd.conf
- phpMyAdmin.conf
- mediawiki.conf
- ./try_setup
- Copies the current config file as mediawiki.conf_sav.
- If no else is editing mediawiki.conf, then mediawiki.conf_new has the same content, and is ready to be edited. Otherwise, copy _sav to _new before you begin.
- ./try
- Put mediawiki.conf_new in place and restart the server.
- For a quick test, refresh the page for each of the main wikis:
- If you can see the page and the generated links are correct, the wiki is usable.
- If you've done any work on the skins, then test the changes, as well
- ./revert
- Put mediawiki.conf_sav back in place, in case the _new version didn't work.