FriendsOfFlarum / sitemap

Generate a sitemap.
https://discuss.flarum.org/d/14941
MIT License
14 stars 16 forks source link

/sitemap.xml not working #11

Closed ghost closed 4 years ago

ghost commented 4 years ago

https://forum.sourceturk.net/sitemap.xml The link does not work. No log recording.

# php flarum info
Flarum core 0.1.0-beta.13
PHP version: 7.4.6
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, imap, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlrpc, xmlwriter, xsl, zip, Zend OPcache
+----------------------------------+----------------+--------+
| Flarum Extensions                |                |        |
+----------------------------------+----------------+--------+
| ID                               | Version        | Commit |
+----------------------------------+----------------+--------+
| flarum-approval                  | v0.1.0-beta.13 |        |
| flarum-flags                     | v0.1.0-beta.13 |        |
| flarum-likes                     | v0.1.0-beta.13 |        |
| flarum-lock                      | v0.1.0-beta.13 |        |
| flarum-markdown                  | v0.1.0-beta.13 |        |
| flarum-mentions                  | v0.1.0-beta.13 |        |
| flarum-sticky                    | v0.1.0-beta.13 |        |
| flarum-subscriptions             | v0.1.0-beta.13 |        |
| flarum-suspend                   | v0.1.0-beta.13 |        |
| flarum-tags                      | v0.1.0-beta.13 |        |
| flarum-emoji                     | v0.1.0-beta.13 |        |
| flarum-lang-english              | v0.1.0-beta.13 |        |
| fof-terms                        | 0.4.2          |        |
| fof-transliterator               | 0.2.0          |        |
| fof-pages                        | 0.4.0          |        |
| fof-user-directory               | 0.3.4          |        |
| fof-merge-discussions            | 0.3.3          |        |
| flagrow-ads                      | 0.2.4          |        |
| fof-best-answer                  | 0.1.7          |        |
| fof-drafts                       | 0.1.5          |        |
| fof-links                        | 0.3.0          |        |
| fof-user-bio                     | 0.1.3          |        |
| v17development-seo               | 1.2            |        |
| fof-follow-tags                  | 0.3.4          |        |
| fof-socialprofile                | 0.1.2          |        |
| fof-subscribed                   | 0.2.3          |        |
| fof-formatting                   | 0.1.4          |        |
| flarum-auth-github               | v0.1.0-beta.13 |        |
| fof-recaptcha                    | 0.1.2          |        |
| flarum-auth-facebook             | v0.1.0-beta.13 |        |
| fof-auth-discord                 | 0.1.3          |        |
| flarum-auth-twitter              | v0.1.0-beta.13 |        |
| fof-polls                        | 0.1.2          |        |
| fof-byobu                        | 0.5.0          |        |
| jordanjay29-summaries            | 0.3.1          |        |
| flagrow-analytics                | 0.8.0          |        |
| fof-geoip                        | 0.1.7          |        |
| flarum-bbcode                    | v0.1.0-beta.12 |        |
| fof-upload                       | 0.9.1          |        |
| flarum-pusher                    | v0.1.0-beta.13 |        |
| isaced-email-verification-switch | 0.1.3          |        |
| fof-realtimedate                 | 0.1.2          |        |
| tolgaaaltas-turkish              | 0.13.2         |        |
| tolgaaaltas-lang-turkish         | 0.13.0         |        |
| fof-profile-image-crop           | 0.1.1          |        |
| flarum-statistics                | v0.1.0-beta.13 |        |
| clarkwinkelmann-circle-groups    | 0.2.1          |        |
| therealsujitk-gifs               | v1.4.8         |        |
| zerosonesfun-hashtags            | 2.0.1          |        |
| askvortsov-moderator-warnings    | v0.1.5         |        |
| fof-spamblock                    | 0.2.2          |        |
| fof-share-social                 | 0.1.2          |        |
| nomiscz-auth-steam               | v0.1.7         |        |
| the-turk-password-strength       | 0.1.3          |        |
| therealsujitk-show-password      | v1.0.3         |        |
| fof-nightmode                    | 0.4.0          |        |
| the-turk-diff                    | 1.0.6          |        |
| askvortsov-categories            | v0.2.7         |        |
| bokt-redis                       | 0.1.0          |        |
| fof-sitemap                      | 0.4.0          |        |
+----------------------------------+----------------+--------+
Base URL: https://forum.sourceturk.net
Installation path: /var/www/sourceturk/flarum
Debug mode: off
clarkwinkelmann commented 4 years ago

What's your webserver ?

If you are on nginx, have you tried this fix https://discuss.flarum.org/d/14941-fof-sitemap/13 ? It was previously in the README but it seems like it was removed at some point. We should re-add it.

Another option if the "automatic" mode doesn't work, you could use the Disk Mode via a CRON task https://github.com/FriendsOfFlarum/sitemap#cache-or-disk-mode

ghost commented 4 years ago

I am using nginx webserver. I added and it improved:

location = /sitemap.xml
{
    try_files $uri $uri/ /index.php?$query_string;
}
clarkwinkelmann commented 4 years ago

Glad to hear that! I have fixed the README so that hopefully other people will find the fix if they need it.

I still find it odd that it's not always required. On some nginx servers it works out of the box, while on others it requires this additional rule. At least we know a solution.