<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Ubuntu_MediaWiki</id>
	<title>Ubuntu MediaWiki - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Ubuntu_MediaWiki"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Ubuntu_MediaWiki&amp;action=history"/>
	<updated>2026-06-20T05:22:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Ubuntu_MediaWiki&amp;diff=6061&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;=File Uploading=  To upload files, allowed extensions must be specified in &lt;code&gt;LocalSettings.php&lt;/code&gt;, and permission must be given for the web server (i.e., MediaWiki) to cr...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Ubuntu_MediaWiki&amp;diff=6061&amp;oldid=prev"/>
		<updated>2015-03-16T00:16:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=File Uploading=  To upload files, allowed extensions must be specified in &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;, and permission must be given for the web server (i.e., MediaWiki) to cr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=File Uploading=&lt;br /&gt;
&lt;br /&gt;
To upload files, allowed extensions must be specified in &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;, and permission must be given for the web server (i.e., MediaWiki) to create arbitrary directories to store uploaded files. &lt;br /&gt;
&lt;br /&gt;
===Step 1: Modify LocalSettings.php===&lt;br /&gt;
&lt;br /&gt;
Add the following lines to LocalSettings.php to allow uploads of specific extensions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgFileExtensions = array(&amp;#039;png&amp;#039;,&amp;#039;gif&amp;#039;,&amp;#039;jpg&amp;#039;,&amp;#039;jpeg&amp;#039;,&amp;#039;doc&amp;#039;,&amp;#039;xls&amp;#039;,&amp;#039;mpp&amp;#039;,&amp;#039;pdf&amp;#039;,&amp;#039;ppt&amp;#039;,&amp;#039;tiff&amp;#039;,&amp;#039;bmp&amp;#039;,&amp;#039;docx&amp;#039;, &amp;#039;xlsx&amp;#039;, &amp;#039;pptx&amp;#039;,&amp;#039;ps&amp;#039;,&amp;#039;odt&amp;#039;,&amp;#039;ods&amp;#039;,&amp;#039;odp&amp;#039;,&amp;#039;odg&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or this, to allow uploads of any extensions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$wgStrictFileExtensions = false;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 2: Give Web Server Permissions===&lt;br /&gt;
&lt;br /&gt;
Uploaded files go to &amp;lt;code&amp;gt;/www/w/images&amp;lt;/code&amp;gt;, so give the webserver (user/group www-data using Ubuntu&amp;#039;s defaults) read/write/execute access to images:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo chown www-data:www-data images/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and permissions should be 755 &amp;lt;code&amp;gt;rwxr-xr-x&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
drwxr-xr-x  5 www-data www-data  images/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=URL Rewriting=&lt;br /&gt;
&lt;br /&gt;
See this page for details: http://www.mediawiki.org/wiki/Manual:Short_URL/Apache&lt;br /&gt;
&lt;br /&gt;
Getting urls like &amp;lt;code&amp;gt;ethane.siluria.com/wiki/PageName&amp;lt;/code&amp;gt; working requires several steps:&lt;br /&gt;
&lt;br /&gt;
===Step 1: Modify LocalSettings.php===&lt;br /&gt;
&lt;br /&gt;
Near the top of LocalSettings.php, the variable &amp;lt;code&amp;gt;$wgScriptPath&amp;lt;/code&amp;gt; is defined. Redefine it, along with the &amp;lt;code&amp;gt;$wgArticlePath&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$wgUsePathInfo&amp;lt;/code&amp;gt; variables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
###############################################&lt;br /&gt;
#&lt;br /&gt;
$wgScriptPath = &amp;quot;/w&amp;quot;;&lt;br /&gt;
$wgArticlePath=&amp;quot;/wiki/$1&amp;quot;;&lt;br /&gt;
$wgUsePathInfo = true;&lt;br /&gt;
#&lt;br /&gt;
###############################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will properly reformat requests from &amp;lt;code&amp;gt;/wiki/$1&amp;lt;/code&amp;gt; to MediaWiki.&lt;br /&gt;
&lt;br /&gt;
===Step 2: Modify Apache Configuration File===&lt;br /&gt;
&lt;br /&gt;
Modify the Apache configuration file for a wiki VirtualHost as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    Alias /wiki /www/w/index.php&lt;br /&gt;
    Alias /w /www/w&lt;br /&gt;
    &amp;lt;Directory &amp;quot;/www/w&amp;quot;&amp;gt;&lt;br /&gt;
        # Enable the rewrite engine&lt;br /&gt;
        RewriteEngine On&lt;br /&gt;
        # Short url for wiki pages&lt;br /&gt;
        RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]&lt;br /&gt;
&lt;br /&gt;
        Options Indexes FollowSymLinks MultiViews&lt;br /&gt;
        AllowOverride None&lt;br /&gt;
        Order allow,deny&lt;br /&gt;
        allow from all&lt;br /&gt;
    &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Ubuntu]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>