Skip to content

setting up Matomo

Solved General
48 2 7.8k 1
  • @jac I see it - you’ll need to create the new subdomain in your Virtualmin instance

    @phenomlab logged in to Virtualmin now.

    Just looking how to do this.

  • @phenomlab logged in to Virtualmin now.

    Just looking how to do this.

    @jac looks tricky if you don’t know what you’re doing 😉

  • @jac looks tricky if you don’t know what you’re doing 😉

    @jac Create virtual server > sub server?

  • @jac Create virtual server > sub server?

    @jac I don’t want to post sensitive information but is this correct?

    Screenshot 2021-12-09 at 12-53-14 (1) stockportcounty fans - Create Virtual Sub-Server — Webmin 1 981 (Ubuntu Linux 20 04 3).png

  • @jac I don’t want to post sensitive information but is this correct?

    Screenshot 2021-12-09 at 12-53-14 (1) stockportcounty fans - Create Virtual Sub-Server — Webmin 1 981 (Ubuntu Linux 20 04 3).png

    @jac Yep, that’s it.

  • @jac Yep, that’s it.

    @phenomlab thanks, now to proceed 🙂

  • @phenomlab thanks, now to proceed 🙂

    @jac said in setting up Matomo:

    @phenomlab thanks, now to proceed 🙂

    rookie error 😉

    “Failed to create virtual server : A sub-server cannot have MySQL enabled unless the parent server does”

  • @jac said in setting up Matomo:

    @phenomlab thanks, now to proceed 🙂

    rookie error 😉

    “Failed to create virtual server : A sub-server cannot have MySQL enabled unless the parent server does”

    @jac Yes, that means that MySQL isn’t enabled at the root domain. You’ll need to go to the root domain, and enable that feature for it to work on subdomains.

    The reason for it being missing is that you do not require MySQL for NodeBB as it uses MongoDB instead.

  • @jac Yes, that means that MySQL isn’t enabled at the root domain. You’ll need to go to the root domain, and enable that feature for it to work on subdomains.

    The reason for it being missing is that you do not require MySQL for NodeBB as it uses MongoDB instead.

    @phenomlab Thanks Mark,

    I’ll go and locate this now.

  • @phenomlab Thanks Mark,

    I’ll go and locate this now.

    @jac done 🙂

  • @jac Yes, this probably helps

    c4410185-5774-455f-ba84-de1b87abf74a-image.png

  • @jac Now re-add the subdomain

  • @jac “Requesting a certificate for stats.stockportcounty.fans, www.stats.stockportcounty.fans from Let’s Encrypt …”

    that will be interesting… 👀

  • @jac “Requesting a certificate for stats.stockportcounty.fans, www.stats.stockportcounty.fans from Let’s Encrypt …”

    that will be interesting… 👀

    @jac Should be fine. It may bomb on the www request - let me know if that’s the case.

  • @jac Should be fine. It may bomb on the www request - let me know if that’s the case.

    @phenomlab said in setting up Matomo:

    @jac Should be fine. It may bomb on the www request - let me know if that’s the case.

    Requesting a certificate for stats.stockportcounty.fans, www.stats.stockportcounty.fans from Let's Encrypt ..
    .. request failed : Web-based validation failed :
    
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator webroot, Installer None
    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for stats.stockportcounty.fans
    http-01 challenge for www.stats.stockportcounty.fans
    Using the webroot path /home/stockportcounty/domains/stats.stockportcounty.fans/public_html for all unmatched domains.
    Waiting for verification...
    Challenge failed for domain www.stats.stockportcounty.fans
    http-01 challenge for www.stats.stockportcounty.fans
    Cleaning up challenges
    Some challenges have failed.
    IMPORTANT NOTES:
     - The following errors were reported by the server:
    
       Domain: www.stats.stockportcounty.fans
       Type:   dns
       Detail: DNS problem: NXDOMAIN looking up A for
       www.stats.stockportcounty.fans - check that a DNS record exists for
       this domain
    
       DNS-based validation failed :
    
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator manual, Installer None
    Obtaining a new certificate
    Performing the following challenges:
    dns-01 challenge for www.stats.stockportcounty.fans
    Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
    Waiting for verification...
    Challenge failed for domain www.stats.stockportcounty.fans
    dns-01 challenge for www.stats.stockportcounty.fans
    Cleaning up challenges
    Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
    Some challenges have failed.
    IMPORTANT NOTES:
     - The following errors were reported by the server:
    
       Domain: www.stats.stockportcounty.fans
       Type:   dns
       Detail: DNS problem: NXDOMAIN looking up TXT for
       _acme-challenge.www.stats.stockportcounty.fans - check that a DNS
       record exists for this domain
    
  • @phenomlab said in setting up Matomo:

    @jac Should be fine. It may bomb on the www request - let me know if that’s the case.

    Requesting a certificate for stats.stockportcounty.fans, www.stats.stockportcounty.fans from Let's Encrypt ..
    .. request failed : Web-based validation failed :
    
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator webroot, Installer None
    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for stats.stockportcounty.fans
    http-01 challenge for www.stats.stockportcounty.fans
    Using the webroot path /home/stockportcounty/domains/stats.stockportcounty.fans/public_html for all unmatched domains.
    Waiting for verification...
    Challenge failed for domain www.stats.stockportcounty.fans
    http-01 challenge for www.stats.stockportcounty.fans
    Cleaning up challenges
    Some challenges have failed.
    IMPORTANT NOTES:
     - The following errors were reported by the server:
    
       Domain: www.stats.stockportcounty.fans
       Type:   dns
       Detail: DNS problem: NXDOMAIN looking up A for
       www.stats.stockportcounty.fans - check that a DNS record exists for
       this domain
    
       DNS-based validation failed :
    
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator manual, Installer None
    Obtaining a new certificate
    Performing the following challenges:
    dns-01 challenge for www.stats.stockportcounty.fans
    Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
    Waiting for verification...
    Challenge failed for domain www.stats.stockportcounty.fans
    dns-01 challenge for www.stats.stockportcounty.fans
    Cleaning up challenges
    Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
    Some challenges have failed.
    IMPORTANT NOTES:
     - The following errors were reported by the server:
    
       Domain: www.stats.stockportcounty.fans
       Type:   dns
       Detail: DNS problem: NXDOMAIN looking up TXT for
       _acme-challenge.www.stats.stockportcounty.fans - check that a DNS
       record exists for this domain
    

    @jac Unsurprising. There are two ways to do this

    • Create a CNAME record called WWW and have it point to the subdomain in DNS
    • Create a custom request for LE so that it ignores the www value, and only processes the actual domain you want

    VirtualMin -> Server Configuration -> SSL Certificate

    8ec0c6a1-fb68-4af8-a66e-b6dba7044a93-image.png

    Let’s Encrypt

    f0f6e0eb-de26-40bc-be66-7ebf708fa9fe-image.png

    Set as per the example, so you only request the domain you want. Ensure that “Automatically renew certificate” is selected, then “Request Certificate”

  • @jac Unsurprising. There are two ways to do this

    • Create a CNAME record called WWW and have it point to the subdomain in DNS
    • Create a custom request for LE so that it ignores the www value, and only processes the actual domain you want

    VirtualMin -> Server Configuration -> SSL Certificate

    8ec0c6a1-fb68-4af8-a66e-b6dba7044a93-image.png

    Let’s Encrypt

    f0f6e0eb-de26-40bc-be66-7ebf708fa9fe-image.png

    Set as per the example, so you only request the domain you want. Ensure that “Automatically renew certificate” is selected, then “Request Certificate”

    @phenomlab said in setting up Matomo:

    @jac Unsurprising. There are two ways to do this

    • Create a CNAME record called WWW and have it point to the subdomain in DNS
    • Create a custom request for LE so that it ignores the www value, and only processes the actual domain you want

    VirtualMin -> Server Configuration -> SSL Certificate

    8ec0c6a1-fb68-4af8-a66e-b6dba7044a93-image.png

    Let’s Encrypt

    f0f6e0eb-de26-40bc-be66-7ebf708fa9fe-image.png

    Set as per the example, so you only request the domain you want. Ensure that “Automatically renew certificate” is selected, then “Request Certificate”

    Thanks,

    which is the best solution?

  • @phenomlab said in setting up Matomo:

    @jac Unsurprising. There are two ways to do this

    • Create a CNAME record called WWW and have it point to the subdomain in DNS
    • Create a custom request for LE so that it ignores the www value, and only processes the actual domain you want

    VirtualMin -> Server Configuration -> SSL Certificate

    8ec0c6a1-fb68-4af8-a66e-b6dba7044a93-image.png

    Let’s Encrypt

    f0f6e0eb-de26-40bc-be66-7ebf708fa9fe-image.png

    Set as per the example, so you only request the domain you want. Ensure that “Automatically renew certificate” is selected, then “Request Certificate”

    Thanks,

    which is the best solution?

    @jac Well, depending on configuration, they are as simple as each other. If you choose the first, then you need to add DNS records, and ensure your server is capable of handling them on arrival (it should be by default).

    If you choose the second, it’s the easiest (and probably laziest 🙂 ), but it will work. We just then need to set a redirect so that all traffic lands up at https://site.domain.com even if we try with or without the www prefix.

  • @jac Well, depending on configuration, they are as simple as each other. If you choose the first, then you need to add DNS records, and ensure your server is capable of handling them on arrival (it should be by default).

    If you choose the second, it’s the easiest (and probably laziest 🙂 ), but it will work. We just then need to set a redirect so that all traffic lands up at https://site.domain.com even if we try with or without the www prefix.

    @phenomlab said in setting up Matomo:

    If you choose the second, it’s the easiest (and probably laziest ), but it will work. We just then need to set a redirect so that all traffic lands up at https://site.domain.com even if we try with or without the www prefix.

    Will try this now mate 🙂

  • @phenomlab said in setting up Matomo:

    If you choose the second, it’s the easiest (and probably laziest ), but it will work. We just then need to set a redirect so that all traffic lands up at https://site.domain.com even if we try with or without the www prefix.

    Will try this now mate 🙂

    @jac As per PM, this has been completed.

  • phenomlabundefined phenomlab marked this topic as a question on
  • phenomlabundefined phenomlab has marked this topic as solved on

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