Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Possible to host a sub-directory on a separate server?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Possible to host a sub-directory on a separate server?

Hi

Is it possible to host a subdirectory - domain.tld/subd

It's pretty easy to host a subdomain - add an A record and you are done. But how could a subdirectory be done?

Thanks

Comments

  • Actually I'll live with a sub domain.

  • Reverse proxy. Can do it with Apache, Nginx, etc.

  • Yup subdomain is a better choice since it's easly done on the DNS level, no need to complicate things with reverse proxies.

  • just go with subdomain man why waste your time ?

  • Would a subdir work on a different ip/with reverse proxy(whatever can do it) with https with a single domain ssl?

  • Maybe mount the directory? Like SSHFS or something might work? Never tested.

  • @TheOnlyDK said:
    Maybe mount the directory? Like SSHFS or something might work? Never tested.

    That is the reason why i have this in favorites

    https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

    And create a symbolic link

  • joepie91joepie91 Member, Patron Provider

    Careful.

    If this is meant to eg. host things for somebody else under a subdirectory, then this can have very problematic consequences for security. All browser security mechanisms (cross-origin resource protection, cookies, ...) work based on the hostname that code runs from.

    You could indeed set up a reverse proxy on a certain path if this is just to spread out your own things across multiple servers, but this likely won't help much - now both servers would need to be up for things to be available, so there's only a few edgecases (eg. disk space) where this setup really makes sense.

    Best to just go with a subdomain.

Sign In or Register to comment.