Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 4 of 4

This is a discussion on is this possible ? in the Shared & Semi-Dedicated forum
Hi, Say I have a domain "foo.org". Create 2 subdomains: dev.foo.org and live.foo.org The directory structure would be: ~/www/dev/ ~/www/live/ Is it possible to serve ...

  1. #1
    JPC Member
    Join Date
    May 2003
    Posts
    1

    Question is this possible ?

    Hi,

    Say I have a domain "foo.org".

    Create 2 subdomains: dev.foo.org and live.foo.org

    The directory structure would be:

    ~/www/dev/
    ~/www/live/

    Is it possible to serve foo.org (and www.foo.org) off live.foo.org ?

    In other word, I'd like ~/www/live/ to "act" as the apache documentroot of the site.

    The reason for doing this is to setup a development directory and a live (production) directory. And pushing a tested site to production can be done by simply renaming the test dir to live.

    One requirement would be that the browser address bar should show (foo.org or www.foo.org) and not (live.foo.org or foo.org/live).

    I hope my explaination is clear enough.

    Thanx in advance.

    -cs

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    You should be able to do something with mod_rewrite, although I don't have the exact rules to use figured out...

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    Probably easiest to ask support to change the documentroot for your main site to public_html/live instead of public_html.

    It's (AFAIK) just a one line change in the httpd file of the server, so they might not mind. On the other hand, it might mess with automatic setups through the CPanel software, so maybe they will mind after all. But asking is worth a try IMHO, before going for rewrite rules instead.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  4. #4
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    try the following:
    1. Create subdomains live and dev
    In your home directory:
    2. mv public_html public_html.real
    3. ln -s public_html.real/live public_html
    4. cd public_html.real/live
    5. ln -s ../dev dev
    6. ln -s . live

    If apache is configured to follow symlinks, that should work.
    Good luck

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •