ISFDB:Full Linux Website

From ISFDB
Revision as of 08:55, 16 July 2023 by Ahasuerus (talk | contribs) (+robots.txt)
Jump to navigation Jump to search

Setting up an ISFDB Web server

1. Follow the instructions at ISFDB:Personal Linux Website. This will handle everything except the Wiki setup.

2. Download the versions of the PHP and MediaWiki packages listed on Special:Version.

3. Install PHP.

4. Place the MediaWiki package in the Apache directory. In a typical install this would be /var/www. Extract the files by executing: tar -xvf mediawiki-version.tar . Rename the directory: mv mediawiki-version wiki

5. Modify wiki/LocalSettings.php. Make the following changes/additions:

$IP = "/var/www/wiki";
$wgSitename        = "ISFDB";
$wgScriptPath      = "/wiki";
$wgLogo            = "$wgStylePath/common/images/isfdb.gif";
$wgEmergencyContact = "somebody@email_account.com";
$wgPasswordSender   = "postmaster@your_host_name";
$wgDBserver         = "localhost";
$wgDBname           = "isfdb";
$wgDBuser           = "root";
$wgDBpassword       = "";
$wgDBprefix         = "mw_";
$wgGroupPermissions['*']['edit'] = false;
$wgSpamRegex = "/\<.*style.*?(display|position|overflow|visibility|height)\s*:.*?>/i";
$wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://creativecommons.org/licenses/by/2.0/";
$wgRightsText = "Attribution";
$wgRightsIcon = "http://creativecommons.org/images/public/somerights20.gif";
$wgAllowExternalImages = true;
$wgServer = "http://www.isfdb.org";
$wgExtraNamespaces[100] = "Author";
$wgExtraNamespaces[101] = "Author_talk";
$wgExtraNamespaces[102] = "Bio";
$wgExtraNamespaces[103] = "Bio_talk";
$wgExtraNamespaces[104] = "Fanzine";
$wgExtraNamespaces[105] = "Fanzine_talk";
$wgExtraNamespaces[106] = "Magazine";
$wgExtraNamespaces[107] = "Magazine_talk";
$wgExtraNamespaces[108] = "Publication";
$wgExtraNamespaces[109] = "Publication_talk";
$wgExtraNamespaces[110] = "Publisher";
$wgExtraNamespaces[111] = "Publisher_talk";
$wgExtraNamespaces[112] = "Series";
$wgExtraNamespaces[113] = "Series_talk";
require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );

6. Upgrade the Wiki if necessary.

  • Modify AdminSettings.php with the mysql username and password
  • In wiki/extensions install the ConfirmEdit extension
  • cd wiki/maintenance execute: php update.php

5. Create a "robots.txt" file with the following contents:

#User-agent: *
#Disallow: /
#
#User-Agent: Googlebot

User-Agent: *
Disallow: /cgi-bin/adv_search_results.cgi*
Disallow: /cgi-bin/se.cgi*
Disallow: /cgi-bin/edit/
Disallow: /cgi-bin/mod/
Disallow: /cgi-bin/diffselect*
Disallow: /cgi-bin/recent*
Disallow: /cgi-bin/user*
Disallow: /cgi-bin/my*
Disallow: /cgi-bin/search*
Disallow: /cgi-bin/stats*
Crawl-delay: 3
Request-rate: 1/3

Put robots.txt in the root directory of your domain and set permissions to 644. Check that it is accessible by browsers by pointing your browser at https://isfdb.org/robots.txt where "isfdb.org" is your domain name. The browser should display the data listed above. If the data is not displayed, robots.txt is in the wrong directory or has invalid permissions.