Set up subdomains

Discussion in 'Server Operation' started by cheezy, Apr 13, 2008.

  1. cheezy

    cheezy New Member


    I want to make the following happen:

    I have and want to create subdomains. I already saw that you can do that with Apache using VirtualHosts but then you can only specify a DocumentRoot. What I want is some kind of forward to another IP address in the same network. Example: -> ->

    Can anybody tell me how to set something like this up? Can it be done with Apache? Or is it something my router should handle?
  2. Puthuff

    Puthuff New Member

    using dns make A records for the sub domains
  3. zcworld

    zcworld New Member

    ok personal i would use an proxy mod in apche

    where i setup an vhost for that sub2
    and forward it to the other box inside my network / port

    and its just = *inside the network*

    last thing you want is to remember ports for normal users
    UNLESS its an admin / private / test / other site
  4. cheezy

    cheezy New Member

    Thanks for the advice to use mod proxy! I didn't hear about this one yet. I started looking for how to configure that and ended up with:

    <VirtualHost *>
    ProxyPreserveHost On
    ProxyRequests Off
    <Proxy *>
    Order deny,allow
    Allow from all
    ProxyPass /
    ProxyPassReverse /

    For each subdomain I configured a VirtualHost like this. Thanks!
  5. paulororke

    paulororke New Member

    performace on reverse proxy.

    So glad to have found this post. I was having a terrible time trying to get this working until I saw this post and added the line
    ProxyPreserveHost On
    to my virtual host config. Now the site rockets where it had been painfully slow and CSS was missing.

    This forum rocks!

Share This Page