Mobile app version of vmapp.org
Login or Join
Steve110

: Point sub directory to another IP? We have a website that we want to keep on it's hosting - www.domain.com. We then want to point a sub directory to hosting that is somewhere else www.domain.com/new-website.

@Steve110

Posted in: #Directory #WebHosting

We have a website that we want to keep on it's hosting - domain.com.
We then want to point a sub directory to hosting that is somewhere else domain.com/new-website.
Is it possible to have the root level of the domain to point to one hosting and a sub directory to point to another set of hosting using A records?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Steve110

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ravi8258870

It's a better idea to use sub*domains* for this, just create another A-record for the subdomain and then you're done.

If you want to use the sub-directories still, you have two options:

Apache's mod_rewrite to write a subdomain to a directory, where you'd create sub2.example.com and it would be accessible via example.com/dir2

My recommended approach, however, is to use the mod_proxy (Make sure all of the mod_proxy* modules are enabled).

<VirtualHost *:80>
ServerAdmin webmaster@localhost
<Location /directory2>
ProxyPass remote-ip-addr:80/ #you can have servers running on any port
Order allow,deny
Allow from all
</Location>
</VirtualHost>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme