No internet connection
  1. Home
  2. Support

How to install Talkyard prod in a subdirectory?

By Nat Slater @Natslater
    2020-06-22 02:57:09.681Z

    We have an AWS Ubuntu 18.04 2GB RAM server running LAMP and another script in public_html. We need to install TalkYard at:

    Domain.com/subfolder

    Using the Github instructions, (https://github.com/debiki/talkyard-prod-one) is it an Apache virtualhosts issue to run Talkyard in /subfolder?

    What is the recommended configuration?

    Solved in post #2, click to view
    • 3 replies
    1. KajMagnus @KajMagnus2020-06-22 10:44:50.192Z2020-06-22 10:52:19.219Z

      Hi Nat,

      /subfolder/ installation is not supported (and not planned, in the nearest future).

      What about installing on a 3 GB DigitalOcean $15/mo droplet another AWS VPS, and placing on a sub domain?
      2 GB is a bit little, and when there's already a LAMP server on the same machine, I think it's better to install on a different server.

      is it an Apache virtualhosts issue to run Talkyard in /subfolder?

      That (configuring Apache or Nginx) would be the easy part, I'd think. The main tricky thing is, I think, to make all links Talkyard generates work with the new /subfolder/ url path prefix. For example, when one Talkyard page links to another, the link instead needs to be /subfolder/something instead of /something. And there're many many links — e.g. to user profiles, admin pages, API endpoints. And maybe problems with React-Router that currently assumes Talkyard is at / (not /subfolder/). Then there're possibly security issues with cookies and HTTP headers, with Talkyard and other servers sharing the same https://server-origin.

      ReplySolution
      1. NNat Slater @Natslater
          2020-06-22 10:54:11.731Z

          Thank you for the detail, yes it looks like a talkyard.domain.com is the best option and just leave it as a subdomain.

          There would be double proxy requests I’m told trying to redirect to a /subfolder with talkyard on another server.

          This then goes back to the subdomain vs subfolder SEO argument. I’m noting that DigitalOcean has there community site on a subfolder:

          DigitalOcean.com/community/

          NOT

          Community.digitalocean.com

          ...and wondering if they did this is for better SEO value with subfolders than subdomain?

          If talkyard doesn’t support subfolders then clearly you think subdomain is better (as does Discourse). But I keep looking at that DO community site on a subfolder and thinking they might be doing SEO better by serving their community from a subfolder?

          1. Hi again Nat,

            double proxy requests I’m told trying to redirect to a /subfolder with talkyard on another server

            You mean Apache, and then Talkyard's own Nginx reverse proxy? Yes that's 2 proxies however the extra latency from one more proxy jump, should, as long as they're nearby (say, in the same datacenter), be sth like < 1 millisecond ? not noticeable for end users.

            Subdirs or subdomains:

            1) it's fine either way, here's from Google 2012: https://www.youtube.com/watch?v=_MswMYk05tk.

            Briefly, he (Matt Cutts) says: Do what's simplest for you. This was year 2012, and the search engine bots only get smarter so dong what's simplest, should work even better nowadays.

            ( & a discussion at Webmasters.StackExchange: https://webmasters.stackexchange.com/questions/3496/do-subdomains-help-hurt-seo )

            2) However, there's one situation in which I'd slightly hesitate to use a subdomain:

            Namely if you have customers with websites on your other sub domains already, e.g. customer-one.yourdomain.com and customer-2.yourdomain.com.

            The search engine bots will then, I would think, realize that such customer websites, on subdomains of yours, are separate websites (because you don't link to them, from your main www.yourdomain.com website).

            Initially, though, I wonder if the search engine bots might mistake a forum you place at, say, talkyard.yourdomain.com or answers.yourdomain.com for also being another customer website, and not your official forum.

            I don't know for sure, but I would think that eventually the search engines realize that talkyard.yourdomain.com or answers.yourdomain.com is part of your own website — because of many links from your main www website to the Q&A forum, and from the forum back to your main website. So I would think that long term, it's not a problem (but I don't know for 100% sure).

            How things work here at Talkyard, is that *.talkyard.io is for Talkyard's own stuff (e.g. www., demo., blog. ... later).

            and *.talkyard.net (note: .net not .io) is for customers who don't have their own domain.

            ***

            About DigitalOcean: 1) I've gotten the impression that they've written the software powering their community pages themselves — that it's all part of the same app server powering www. If so, then, for them, it'd be simplest to place their community pages in a subfolder. So right now it seems to me they've followed the "do what's simplest" approach. At the same time, 2) D.O. were founded 2011 — maybe at that time, people tended to prefer subfolders for SEO reasons (year 2011).