Skip to content

Issues getting Flarum to work on new host

Solved Configure
65 4 29.6k 1
  • @Hari said in Issues getting Flarum to work on new host:

    sorry, i have no clue where to update DNS
    i have pointed ask.domain.com to my DO IP at CF

    That’s all you need to do. Let me see if I can get the cert to work

    wrote on last edited by
    #39

    @phenomlab thanks, daily upvote limit reched

  • @phenomlab thanks, daily upvote limit reched

    wrote on last edited by
    #40

    @Hari said in Issues getting Flarum to work on new host:

    thanks, daily upvote limit reched

    Yeah, I need to fix that !!

  • @Hari said in Issues getting Flarum to work on new host:

    thanks, daily upvote limit reched

    Yeah, I need to fix that !!

    wrote on last edited by
    #41

    @phenomlab do i need to update the subdomain at Nginx config files? i have seen IP there

  • @phenomlab do i need to update the subdomain at Nginx config files? i have seen IP there

    wrote on last edited by
    #42

    @Hari No. Leave that as is

  • @phenomlab thanks, daily upvote limit reched

    wrote on last edited by
    #43

    @Hari said in Issues getting Flarum to work on new host:

    daily upvote limit reched

    Should be resolved now. Try upvoting again (same for @crazycells)

  • @Hari No. Leave that as is

    wrote on last edited by
    #44

    @phenomlab ok, i have checked gt matrix looks like response time is very slow how can i increase it?

  • @Hari said in Issues getting Flarum to work on new host:

    daily upvote limit reched

    Should be resolved now. Try upvoting again (same for @crazycells)

    wrote on last edited by
    #45

    @phenomlab i am seeing upvote limit is 10 still could not upvote

  • @phenomlab ok, i have checked gt matrix looks like response time is very slow how can i increase it?

    wrote on last edited by
    #46

    @Hari As you are running this domain through CF, you should enable the caching and protection there. At the moment, you are pointing to the server directly.

  • @phenomlab i am seeing upvote limit is 10 still could not upvote

    wrote on last edited by
    #47

    @Hari Let me check

  • @phenomlab i am seeing upvote limit is 10 still could not upvote

    wrote on last edited by
    #48

    @Hari said in Issues getting Flarum to work on new host:

    i am seeing upvote limit is 10 still could not upvote

    Try now

  • @Hari said in Issues getting Flarum to work on new host:

    i am seeing upvote limit is 10 still could not upvote

    Try now

    wrote on last edited by
    #49

    @phenomlab still same

  • @phenomlab still same

    wrote on last edited by
    #50

    @Hari Seems the max value is hard coded, so you’ll have to wait until tomorrow 😄

  • @Hari Seems the max value is hard coded, so you’ll have to wait until tomorrow 😄

    wrote on last edited by
    #51

    @phenomlab sure, i have enabled CF cache but the response time is still slow should i enable redis cache ?

  • Hari Hari has marked this topic as solved on
  • @phenomlab sure, i have enabled CF cache but the response time is still slow should i enable redis cache ?

    wrote on last edited by
    #52

    @Hari Redis cache isn’t the “saviour” everyone thinks it is - most of files and assets required to access the site initially will be served from the CF edge networks, although CF won’t have any impact on the database.

    Something like Flarum’s ReCache is suggested here - I know that the developer of this product has since left the Flarum team, so I’m not sure if this is still an active product.

  • @Hari Redis cache isn’t the “saviour” everyone thinks it is - most of files and assets required to access the site initially will be served from the CF edge networks, although CF won’t have any impact on the database.

    Something like Flarum’s ReCache is suggested here - I know that the developer of this product has since left the Flarum team, so I’m not sure if this is still an active product.

    wrote on last edited by
    #53
  • @Hari Redis cache isn’t the “saviour” everyone thinks it is - most of files and assets required to access the site initially will be served from the CF edge networks, although CF won’t have any impact on the database.

    Something like Flarum’s ReCache is suggested here - I know that the developer of this product has since left the Flarum team, so I’m not sure if this is still an active product.

    wrote on last edited by Hari
    #54
  • wrote on last edited by
    #55

    @Hari its working without adding this lines

  • wrote on last edited by
    #56

    @Hari You need to add this to the Flarum .nginx.conf file, like the below

    location / {
    	try_files $uri $uri/ /index.php?$query_string;
    }
    location = /sitemap.xml {
        try_files $uri $uri/ /index.php?$query_string;
    }
    

    So just outside of the default location / block

  • @Hari You need to add this to the Flarum .nginx.conf file, like the below

    location / {
    	try_files $uri $uri/ /index.php?$query_string;
    }
    location = /sitemap.xml {
        try_files $uri $uri/ /index.php?$query_string;
    }
    

    So just outside of the default location / block

    wrote on last edited by Hari
    #57

    @phenomlab for now sitemap is loading should i still add these lines in nginx? (thinking to ignore adding these)

    i rebooted the server and the composer is not found

    should i need to install composer again?

    cd /home/ask/public_html

    [root@ask public_html]# composer require fof/best-answer:"*"
    sh: 1: composer: not found
    [root@ask public_html]# composer require fof/best-answer:"*"
    sh: 1: composer: not found
    [root@ask public_html]# locate composer
    [root@ask public_html]#
    
  • @phenomlab for now sitemap is loading should i still add these lines in nginx? (thinking to ignore adding these)

    i rebooted the server and the composer is not found

    should i need to install composer again?

    cd /home/ask/public_html

    [root@ask public_html]# composer require fof/best-answer:"*"
    sh: 1: composer: not found
    [root@ask public_html]# composer require fof/best-answer:"*"
    sh: 1: composer: not found
    [root@ask public_html]# locate composer
    [root@ask public_html]#
    
    wrote on last edited by phenomlab
    #58

    @Hari Seems to work fine for me ?

    fa9f306f-4384-44ff-9485-cb2fb66d9890-image.png

    c081e43b-2963-4c64-a18f-3f90d90c7c97-image.png


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Fedora Server + Virtualmin

    Chitchat fedora server linux virtualmin
    1
    1 Votes
    1 Posts
    319 Views
    No one has replied
  • 3 Votes
    30 Posts
    12k Views
    phenomlab
    @DownPW any update?
  • 5 Votes
    13 Posts
    3k Views
    DownPW
    'use strict'; const winston = require('winston'); const user = require('../user'); const notifications = require('../notifications'); const sockets = require('../socket.io'); const plugins = require('../plugins'); const meta = require('../meta'); module.exports = function (Messaging) { Messaging.notifyQueue = {}; // Only used to notify a user of a new chat message, see Messaging.notifyUser Messaging.notifyUsersInRoom = async (fromUid, roomId, messageObj) => { let uids = await Messaging.getUidsInRoom(roomId, 0, -1); uids = await user.blocks.filterUids(fromUid, uids); let data = { roomId: roomId, fromUid: fromUid, message: messageObj, uids: uids, }; data = await plugins.hooks.fire('filter:messaging.notify', data); if (!data || !data.uids || !data.uids.length) { return; } uids = data.uids; uids.forEach((uid) => { data.self = parseInt(uid, 10) === parseInt(fromUid, 10) ? 1 : 0; Messaging.pushUnreadCount(uid); sockets.in(`uid_${uid}`).emit('event:chats.receive', data); }); if (messageObj.system) { return; } // Delayed notifications let queueObj = Messaging.notifyQueue[`${fromUid}:${roomId}`]; if (queueObj) { queueObj.message.content += `\n${messageObj.content}`; clearTimeout(queueObj.timeout); } else { queueObj = { message: messageObj, }; Messaging.notifyQueue[`${fromUid}:${roomId}`] = queueObj; } queueObj.timeout = setTimeout(async () => { try { await sendNotifications(fromUid, uids, roomId, queueObj.message); } catch (err) { winston.error(`[messaging/notifications] Unabled to send notification\n${err.stack}`); } }, meta.config.notificationSendDelay * 1000); }; async function sendNotifications(fromuid, uids, roomId, messageObj) { const isOnline = await user.isOnline(uids); uids = uids.filter((uid, index) => !isOnline[index] && parseInt(fromuid, 10) !== parseInt(uid, 10)); if (!uids.length) { return; } if (roomId != 11) { // 5 Is the ID of the ID of the global chat room. Messaging.getUidsInRoom(roomId, 0, -1); // Proceed as normal. } else { user.getUidsFromSet('users:online', 0, -1); // Only notify online users. } const { displayname } = messageObj.fromUser; const isGroupChat = await Messaging.isGroupChat(roomId); const notification = await notifications.create({ type: isGroupChat ? 'new-group-chat' : 'new-chat', subject: `[[email:notif.chat.subject, ${displayname}]]`, bodyShort: `[[notifications:new_message_from, ${displayname}]]`, bodyLong: messageObj.content, nid: `chat_${fromuid}_${roomId}`, from: fromuid, path: `/chats/${messageObj.roomId}`, }); delete Messaging.notifyQueue[`${fromuid}:${roomId}`]; notifications.push(notification, uids); } };
  • MailGun Not Working NodeBB

    Solved Configure mail mailgun
    6
    1 Votes
    6 Posts
    2k Views
    cagatay
    @phenomlab did it i did not create smtp user on mailgun. everything is working now. [image: 6cc6061f-ed5d-41f6-8eb7-5d98f98b3706-image.png]
  • auto create flarum new discussions in wordpress

    Configure flarum wordpress
    2
    1 Votes
    2 Posts
    1k Views
    phenomlab
    @Hari I think you’re referring to this https://sudonix.com/topic/170/creating-posts-from-rss-feeds-in-flarum However, this code was never designed to work with WordPress, but you could leverage the WP-CLI to do something similar without too much effort.
  • moving flarum from sub directory to subdomain

    Solved Configure flarum
    15
    2 Votes
    15 Posts
    4k Views
    Hari
    @phenomlab yes, created different app and moved files and DB now everything is working thanks
  • SSl expired on virtualmin

    Solved Configure virtualmin ubun server ssl
    18
    3 Votes
    18 Posts
    7k Views
    phenomlab
    @justoverclock Not necessarily. You only need to use this if it fails from the Virtualmin window
  • VirtualMin create virtual server

    Solved Configure
    4
    2 Votes
    4 Posts
    2k Views
    phenomlab
    @justoverclock correct. You only need to keep an eye on the resources of the droplet itself