I think I only did about half the proess to get my additional domain to point to a sub directory.

Posted April 6, 2016 4.5k views
NginxUbuntuApacheDigitalOceanDNSConfiguration Management

I’m using serverpilot if that helps and my directory structure is

/apps/thekitribe/public/(root directory)

I was hoping my additional domain, say was hosted at


I’ve messed around with the networking tab here on DO and edited some conf files on server pilot all of which I’ve just un-done because the guides i’m reading (not DO specific) are leading me in all various directions.

Do I need to setup a “virtual host” with apache? Isn’t DO a VPS? Big moment of confusion for me. ;-)

What I have now: (both and both point to same numerical domain–top level.)

I’d like to remain top level and then to be in perhaps the /apps/thekitribe/public/kitribe folder.

Sorry if I’m over-complicating this but I’m probably more confused then I should be at the moment lol.


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi, you can use this same guide whether your additional domain is a registered domain or a subdomain:

You definitely shouldn’t customize any config files for this. In other words, you don’t need to use root at all. SSH in as the app’s system user and create the symlink as described in the ServerPilot documentation. That is, create a second app under the same system user, delete this new app’s “public” directory and in its place make a symlink to the directory in the other app you want it to use as the new app’s web root directory, and add your domain to the new app in ServerPilot.

  • Awesome thanks for this. I’ll do it first thing I get home. Love the fast replies here. :)

    • You’re very welcome.

      • If you don’t mind I’d like to share my details of the server (all those dns settings etc) to see if it’s all setup correctly. I been getting DNS errors for the last few days off and on and now the additional domain is completely down it seems. (Note: i truncated the name servers to ns1-3 for this posting.)

        The settings I have:

        (Under DO networking tab:)

        (“View” on the

        • [A] @
        • [CNAME] www
        • ns1
        • ns2
        • ns3

        (“View” on the

        • [A] @
        • [CNAME] www
        • ns1
        • ns2
        • ns3

        Then, on server pilot, I have each domain in its own app, “app1” and “app2” lol.

        Each entry has the vanilla domain and www. prefixed domains listed.

        EDIT: It appears is back up again. Could I be causing issues with these settings or are they ok?

        • Those DNS settings look right and if it started working for you again suddenly, it sounds like a DNS propagation issue. It can take a few hours for new DNS zones or records you add to become reliably accessible. Before that, it can work sometimes but not others. The same for if you change a domain’s nameservers at your registrar.

        • Yeah, that’s super weird if it’s been a few weeks. The best I can see that you might want to change is that it looks like your domain “” only has ns1/ as its nameservers, it’s missing

          • Imgur

            Haven’t edited anything?

          • I actually mean the nameservers that are defined at the registrar (where you make it so that DigitalOcean is used as the authoritative nameservers for the domain).

            Here’s what I see on a whois lookup:

            $ whois
            Name Server: NS1.DIGITALOCEAN.COM
            Name Server: NS2.DIGITALOCEAN.COM

            It’s missing NS3.DIGITALOCEAN.COM

            I don’t think that would cause problems (it shouldn’t unless ns1/ns2 are ever temporarily down), but it’s the only thing that might be considered wrong that I could see.

          • Oh ok thanks. That’s back on lunar pages then. Hopefully I still got that old email/pass lmao.

            UPDATE: Lunarpages it seems only allows a primary and secondary NS. :/ So I guess I got everything “ok” on my end…as far as I can do…which I’m ok with. I realize lots of weird stuff happens on the internet lol.