Get our free book (in Spanish or English) on rainwater now - To Catch the Rain.

Difference between revisions of "Appropedia:Site development/archive (Admin tasks)"

From Appropedia
Jump to: navigation, search
(AWStats still not working (not big deal as Google Analytics is). Moved Input box content.)
(short URLs (aka beautiful URL instructions))
Line 1: Line 1:
 +
==Short URLs==
 +
*See [http://meta.wikimedia.org/wiki/Using_a_very_short_URL wikimedia] and [[User:Helge.at]]
 +
*Set path in LocalSettings.php to <code>$wgArticlePath = "/$1";</code>
 +
*Added .htaccess to root with the following content
 +
<pre>
 +
RewriteEngine on
 +
 +
# Don't rewrite requests for files in MediaWiki subdirectories,
 +
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
 +
RewriteCond %{REQUEST_URI} !^/(stylesheets|images|skins|extensions)
 +
RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
 +
RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
 +
RewriteCond %{REQUEST_URI} !^/favicon.ico
 +
RewriteCond %{REQUEST_URI} !^/robots.txt
 +
RewriteCond %{REQUEST_URI} !^/nowiki
 +
# include these last two lines if you use the analog stats
 +
RewriteCond %{REQUEST_URI} !^/failed_auth.html$
 +
RewriteCond %{REQUEST_URI} !^/stats
 +
 +
RewriteRule ^(.*)$ index.php?title=$1 [QSA]
 +
</pre>
 +
 
==Input box==  
 
==Input box==  
 
*Installed 10/16/06 by --[[User:Lonny|Lonny]]
 
*Installed 10/16/06 by --[[User:Lonny|Lonny]]

Revision as of 19:47, 20 November 2006

Short URLs

  • See wikimedia and User:Helge.at
  • Set path in LocalSettings.php to $wgArticlePath = "/$1";
  • Added .htaccess to root with the following content
RewriteEngine on

# Don't rewrite requests for files in MediaWiki subdirectories,
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
RewriteCond %{REQUEST_URI} !^/(stylesheets|images|skins|extensions)
RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteCond %{REQUEST_URI} !^/nowiki
# include these last two lines if you use the analog stats
RewriteCond %{REQUEST_URI} !^/failed_auth.html$
RewriteCond %{REQUEST_URI} !^/stats

RewriteRule ^(.*)$ index.php?title=$1 [QSA]

Input box

AWStats

Some specifics after installing AWstats. See http://wiki.dreamhost.com/index.php/AWStats_Installation for nice instructions.

Perl to run the page

perl /home/lonny1/awstats/tools/awstats_buildstaticpages.pl  -config=appropedia.org -update \  -awstatsprog=/home/lonny1/awstats/cgi-bin/awstats.pl  -dir=/home/lonny1/appropedia.org/statistics/

Changes to log file

LogFile="/home/lonny1/logs/appropedia.org/http/access.log"
LogFormat="%host %other %other %time1 %methodurl %code %bytesd %refererquot %uaquot"
SiteDomain="appropedia.org"
HostAliases="www.appropedia.org"
DNSLookup=0
DirData="/home/lonny1/awstats/data/"
DirIcons="icon"
SaveDatabaseFilesWithPermissionsForEveryone=0
DefaultFile="index.php index.html"

Cron -e

One every hour on the fifteen minute mark.

15 0 * * * perl /home/lonny1/awstats/tools/awstats_buildstaticpages.pl
-config=appropedia.org -update
-awstatsprog=/home/lonny1/awstats/cgi-bin/awstats.pl
-dir=/home/lonny1/appropedia.org/statistics/

Once per day at 3am:

0 3 * * * perl /home/lonny1/awstats/tools/awstats_buildstaticpages.pl
-config=buildcapacity.org -update
-awstatsprog=/home/lonny1/awstats/cgi-bin/awstats.pl
-dir=/home/lonny1/buildcapacity.org/statistics/

Future steps

  • Password protect the folder [1].

More Notes

Still not working correctly.