Question

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

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

/apps/thekitribe/public/(root directory)

I was hoping my additional domain, say abc.com was hosted at

/apps/thekitribe/public/abc/

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 thexeno.com and kitribe.com both point to same numerical domain–top level.)

I’d like thexeno.com to remain top level and then kitribe.com 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.

Cam


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

https://serverpilot.io/community/articles/how-to-serve-a-subdomain-from-a-subdirectory.html

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.