dolfinus/AutoSitemap

it's no working.

kdaye opened this issue · 1 comments

kdaye commented

MediaWiki 1.29.0-alpha
Nginx+php7.0-fpm

cd /var/www/wiki/extensions
git clone ..../autositemap.git

my Localsettings.php

$wgScriptPath = "";
$wgArticlePath      = "/wiki/$1";
$wgUsePathInfo      = true;
## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://ms2.ren";
wfLoadExtension( 'AutoSitemap' );
$wgAutoSitemap["filename"] = "sitemap.xml";
$wgAutoSitemap["server"] = "http://ms2.ren/wiki/";
$wgAutoSitemap["notify"] = [
    'https://www.google.com/webmasters/sitemaps/ping?sitemap=http://ms2.ren/wiki/sitemap.xml',
    'https://www.bing.com/webmaster/ping.aspx?sitemap=http://ms2.ren/wiki/sitemap.xml',
    'https://blogs.yandex.ru/pings/?status=success&url=http://ms2.ren/wiki/sitemap.xml',
];
$wgAutoSitemap["exclude_namespaces"] = [
    NS_TALK,
    NS_USER,
    NS_USER_TALK,
    NS_PROJECT_TALK,
    NS_IMAGE_TALK,
   NS_MEDIAWIKI,
    NS_MEDIAWIKI_TALK,
    NS_TEMPLATE,
    NS_TEMPLATE_TALK,
    NS_HELP,
    NS_HELP_TALK,
    NS_CATEGORY_TALK
];
$wgAutoSitemap["freq"] = "daily";
chmod +w /var/www/wiki
chown -R www-data.www-data /var/www/wiki

get error when I submit http://ms2.ren/wiki/sitemap.xml to Google Search Console
also try submit http://ms2.ren/sitemap.xml

	
Error
	
We encountered an error while trying to access your Sitemap. Please ensure your Sitemap follows our guidelines and can be accessed at the location you provided and then resubmit.
	
1
	
URL timeout: HTTP request timeout

Parameter $wgAutoSitemap["filename"] sets a path to sitemap file, relative to you Mediawiki folder.
Parameter $wgAutoSitemap["server"] sets a server address, which should be set in all sitemap entries - if you want to set a canonical url for all pages or use strict https.

So, if you want to write you sitemap to ./wiki/sitemap.xml you should use:
$wgAutoSitemap["filename"] = "wiki/sitemap.xml";
//$wgAutoSitemap["server"] - do not change it