<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mwiki.costasano.club/index.php?action=history&amp;feed=atom&amp;title=ICT%3APL_Adding_new_MediaWiki_website</id>
	<title>ICT:PL Adding new MediaWiki website - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mwiki.costasano.club/index.php?action=history&amp;feed=atom&amp;title=ICT%3APL_Adding_new_MediaWiki_website"/>
	<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:PL_Adding_new_MediaWiki_website&amp;action=history"/>
	<updated>2026-04-17T16:23:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mwiki.costasano.club/index.php?title=ICT:PL_Adding_new_MediaWiki_website&amp;diff=1607&amp;oldid=prev</id>
		<title>Mngr: Mngr moved page ICT:PL Adding new MediaWIki website to ICT:PL Adding new MediaWiki website without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:PL_Adding_new_MediaWiki_website&amp;diff=1607&amp;oldid=prev"/>
		<updated>2026-04-03T11:29:59Z</updated>

		<summary type="html">&lt;p&gt;Mngr moved page &lt;a href=&quot;/index.php?title=ICT:PL_Adding_new_MediaWIki_website&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;ICT:PL Adding new MediaWIki website (page does not exist)&quot;&gt;ICT:PL Adding new MediaWIki website&lt;/a&gt; to &lt;a href=&quot;/ICT:PL_Adding_new_MediaWiki_website&quot; title=&quot;ICT:PL Adding new MediaWiki website&quot;&gt;ICT:PL Adding new MediaWiki website&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:29, 3 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Mngr</name></author>
	</entry>
	<entry>
		<id>https://mwiki.costasano.club/index.php?title=ICT:PL_Adding_new_MediaWiki_website&amp;diff=1606&amp;oldid=prev</id>
		<title>Mngr: Created page with &quot;= Infrastructure Overview and Procedure for Adding a New MediaWiki Instance = This document describes the current three‑VM infrastructure used for hosting Drupal, MediaWiki, and related services. It also explains how to add a new MediaWiki instance (newMW) to the existing environment in a clean, reproducible, and low‑risk manner.  == 1. High-Level Architecture == The system is composed of three virtual machines running on Hyper‑V. Each VM has a clearly defined resp...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:PL_Adding_new_MediaWiki_website&amp;diff=1606&amp;oldid=prev"/>
		<updated>2026-04-03T11:14:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Infrastructure Overview and Procedure for Adding a New MediaWiki Instance = This document describes the current three‑VM infrastructure used for hosting Drupal, MediaWiki, and related services. It also explains how to add a new MediaWiki instance (newMW) to the existing environment in a clean, reproducible, and low‑risk manner.  == 1. High-Level Architecture == The system is composed of three virtual machines running on Hyper‑V. Each VM has a clearly defined resp...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Infrastructure Overview and Procedure for Adding a New MediaWiki Instance =&lt;br /&gt;
This document describes the current three‑VM infrastructure used for hosting&lt;br /&gt;
Drupal, MediaWiki, and related services. It also explains how to add a new&lt;br /&gt;
MediaWiki instance (newMW) to the existing environment in a clean,&lt;br /&gt;
reproducible, and low‑risk manner.&lt;br /&gt;
&lt;br /&gt;
== 1. High-Level Architecture ==&lt;br /&gt;
The system is composed of three virtual machines running on Hyper‑V. Each VM&lt;br /&gt;
has a clearly defined responsibility, forming a layered, production‑grade&lt;br /&gt;
architecture.&lt;br /&gt;
&lt;br /&gt;
=== 1.1 VM1 – Web Layer (AlmaLinux) ===&lt;br /&gt;
* Runs Apache (httpd)&lt;br /&gt;
* Runs PHP&lt;br /&gt;
* Hosts:&lt;br /&gt;
** Drupal website&lt;br /&gt;
** oldMW (existing MediaWiki instance)&lt;br /&gt;
** newMW (to be added)&lt;br /&gt;
* Contains all Apache vhosts&lt;br /&gt;
* Contains all rewrite rules (important: rewrites are NOT in nginx)&lt;br /&gt;
* Receives traffic only from VM3 (reverse‑proxy)&lt;br /&gt;
&lt;br /&gt;
=== 1.2 VM2 – Database Layer (AlmaLinux) ===&lt;br /&gt;
* Runs MariaDB&lt;br /&gt;
* Hosts multiple independent databases:&lt;br /&gt;
** drupal&lt;br /&gt;
** oldwiki&lt;br /&gt;
** newwiki (to be created)&lt;br /&gt;
* Accessible only from VM1 (internal Hyper‑V network)&lt;br /&gt;
&lt;br /&gt;
=== 1.3 VM3 – Reverse‑Proxy Layer (AlmaLinux) ===&lt;br /&gt;
* Runs nginx&lt;br /&gt;
* Public-facing entry point&lt;br /&gt;
* Terminates HTTPS&lt;br /&gt;
* Routes incoming requests to VM1 based on domain name&lt;br /&gt;
* Does NOT perform URL rewriting&lt;br /&gt;
* Forwards Host header and client IP&lt;br /&gt;
&lt;br /&gt;
== 2. Traffic Flow ==&lt;br /&gt;
# Client connects to VM3 (nginx) using HTTPS.&lt;br /&gt;
# nginx selects the correct server block based on the domain.&lt;br /&gt;
# nginx forwards the request to VM1 (Apache) using proxy_pass.&lt;br /&gt;
# Apache selects the correct vhost based on ServerName.&lt;br /&gt;
# Apache applies rewrite rules and serves the application.&lt;br /&gt;
# Application (Drupal or MediaWiki) connects to VM2 (MariaDB) as needed.&lt;br /&gt;
&lt;br /&gt;
This separation ensures stability, clarity, and easy maintenance.&lt;br /&gt;
&lt;br /&gt;
== 3. Why This Architecture Works Well ==&lt;br /&gt;
* Each VM has a single responsibility.&lt;br /&gt;
* nginx handles routing and SSL termination.&lt;br /&gt;
* Apache handles application logic and rewrites.&lt;br /&gt;
* MariaDB is isolated and easy to back up.&lt;br /&gt;
* Adding new sites is predictable and low-risk.&lt;br /&gt;
* No component needs to be modified outside its domain.&lt;br /&gt;
&lt;br /&gt;
== 4. Adding a New MediaWiki Instance (newMW) ==&lt;br /&gt;
Adding newMW requires changes on all three VMs, but each change is small,&lt;br /&gt;
isolated, and predictable.&lt;br /&gt;
&lt;br /&gt;
=== 4.1 Step 1 – Create the Database on VM2 (MariaDB) ===&lt;br /&gt;
Connect to MariaDB and create a new database and user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE DATABASE newwiki CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;&lt;br /&gt;
CREATE USER &amp;#039;newwikiuser&amp;#039;@&amp;#039;VM1-IP&amp;#039; IDENTIFIED BY &amp;#039;strongpassword&amp;#039;;&lt;br /&gt;
GRANT ALL PRIVILEGES ON newwiki.* TO &amp;#039;newwikiuser&amp;#039;@&amp;#039;VM1-IP&amp;#039;;&lt;br /&gt;
FLUSH PRIVILEGES;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace &amp;lt;code&amp;gt;VM1-IP&amp;lt;/code&amp;gt; with the internal Hyper‑V IP of the web server.&lt;br /&gt;
&lt;br /&gt;
=== 4.2 Step 2 – Install MediaWiki on VM1 (Web Layer) ===&lt;br /&gt;
Download and extract MediaWiki 1.43 LTS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /var/www&lt;br /&gt;
wget https://releases.wikimedia.org/mediawiki/1.43/mediawiki-1.43.0.tar.gz&lt;br /&gt;
tar -xvzf mediawiki-1.43.0.tar.gz&lt;br /&gt;
mv mediawiki-1.43.0 newMW&lt;br /&gt;
chown -R apache:apache /var/www/newMW&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.3 Step 3 – Create an Apache vhost on VM1 ===&lt;br /&gt;
Create a new vhost file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:8080&amp;gt;&lt;br /&gt;
    ServerName newwiki.example.com&lt;br /&gt;
    DocumentRoot /var/www/newMW&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;Directory /var/www/newMW&amp;gt;&lt;br /&gt;
        AllowOverride All&lt;br /&gt;
        Require all granted&lt;br /&gt;
    &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ErrorLog /var/log/httpd/newwiki-error.log&lt;br /&gt;
    CustomLog /var/log/httpd/newwiki-access.log combined&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart Apache:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
systemctl restart httpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.4 Step 4 – Add a Reverse‑Proxy Entry on VM3 (nginx) ===&lt;br /&gt;
Duplicate an existing server block and adjust only the domain and proxy target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
    listen 80;&lt;br /&gt;
    server_name newwiki.example.com;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        proxy_pass http://VM1-IP:8080;&lt;br /&gt;
        proxy_set_header Host $host;&lt;br /&gt;
        proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reload nginx:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
systemctl reload nginx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.5 Step 5 – Run the MediaWiki Installer ===&lt;br /&gt;
Navigate to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://newwiki.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Provide:&lt;br /&gt;
* Database: &amp;lt;code&amp;gt;newwiki&amp;lt;/code&amp;gt;&lt;br /&gt;
* User: &amp;lt;code&amp;gt;newwikiuser&amp;lt;/code&amp;gt;&lt;br /&gt;
* Password: (as created)&lt;br /&gt;
* Site name&lt;br /&gt;
* Admin account&lt;br /&gt;
&lt;br /&gt;
Download &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; and place it in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/var/www/newMW/LocalSettings.php&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 4.6 Step 6 – Minimal Configuration in LocalSettings.php ===&lt;br /&gt;
Add or verify:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgServer = &amp;quot;https://newwiki.example.com&amp;quot;;&lt;br /&gt;
$wgScriptPath = &amp;quot;&amp;quot;;&lt;br /&gt;
$wgArticlePath = &amp;quot;/wiki/$1&amp;quot;;&lt;br /&gt;
$wgUsePathInfo = true;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enable uploads if needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgEnableUploads = true;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Install SyntaxHighlight:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wfLoadExtension( &amp;#039;SyntaxHighlight_GeSHi&amp;#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 5. Verification Checklist ==&lt;br /&gt;
* &amp;lt;code&amp;gt;https://newwiki.example.com&amp;lt;/code&amp;gt; loads correctly.&lt;br /&gt;
* &amp;lt;code&amp;gt;/wiki/Main_Page&amp;lt;/code&amp;gt; resolves without errors.&lt;br /&gt;
* Editing works.&lt;br /&gt;
* File uploads work (if enabled).&lt;br /&gt;
* No rewrite errors in Apache logs.&lt;br /&gt;
* nginx logs show correct proxying.&lt;br /&gt;
* MariaDB logs show successful connections from VM1.&lt;br /&gt;
&lt;br /&gt;
== 6. Summary ==&lt;br /&gt;
Adding a new MediaWiki instance is straightforward because:&lt;br /&gt;
* nginx handles only routing.&lt;br /&gt;
* Apache handles rewrites and vhosts.&lt;br /&gt;
* MariaDB handles isolated databases.&lt;br /&gt;
* Each VM has a clear, stable role.&lt;br /&gt;
* The existing configuration already supports multi‑site operation.&lt;br /&gt;
&lt;br /&gt;
This document provides a reproducible procedure for extending the system&lt;br /&gt;
without reintroducing the complexity or debugging effort experienced during&lt;br /&gt;
the initial setup.&lt;/div&gt;</summary>
		<author><name>Mngr</name></author>
	</entry>
</feed>