Web Hosting Forums

Results 1 to 7 of 7

This is a discussion on Subdomains and redirects in the Hosting Talk & Chit-chat forum
So...I currently have a subdomain: les.mydomain.com (1) and of course, I can access it via the above address, or by mydomain.com/les/ (2) Now, I'd like ...

  1. #1
    Loyal Client
    Join Date
    Jul 2002
    Posts
    47

    Subdomains and redirects

    So...I currently have a subdomain:

    les.mydomain.com (1)

    and of course, I can access it via the above address, or by

    mydomain.com/les/ (2)

    Now, I'd like to move the files stored at /les/ to /subhost/les/, but retain the subdomain. Is there anyway, either via something with apache or talking to jpc, that I can do so this subdomain redirect works properly? (And ideally, I would like to be able to do it without having to have the /les directory stick around as a placeholder for the subdomain).

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,884
    Support probably can change the directory the subdomain points to in the Apache conf for you. If you wnat to do this yourself, you can delete the directory and make a symbolic link in its place to the new location, but you'll still see the symlink in your public_html directory.

    To make the symlink, log in with SSH and type the following:

    cd public_html (to get into your public_html dir)
    rm -r les (to delete the folder...make sure you don't have anything in there you wnat to keep)
    ln -s subhost/les les (to make the link)

    Now your subdomain will be using the files located at /subhost/les.

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

  3. #3
    Loyal Client
    Join Date
    Jul 2002
    Posts
    47
    Ah, a simple solution that I never would have thought of. I tried talking to Support, but apparently it was out of their control, but the symbolic link will work just fine. Much thanks!

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,884
    You're welcome. I surprised support couldn't help you, but I know that CPanel likes to take over quite a bit of stuff--perhaps it has something that would reset things automatically or whatnot. I don't know its inner workings.

    But have have had the symlink thing running on my site for about a year without a problem.

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

  5. #5
    Loyal Client
    Join Date
    Oct 2003
    Location
    Location: Location:
    Posts
    634
    jason,

    do you know of a good pocket-book style reference for unix line commands? i used to know everything i needed, but it's been a long, long time...

    even some preferred links, like a ready reference or something?

    thanks!

  6. #6
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,884
    Sorry for not responding to this a little sooner.

    Its been a while since I've gone shopping for a Unix book, but I have a few books that I still pull out from time to time. All of mine are a few years old now, so I'm not sure what's still being published and whatnot, and there are probably better ones out there now. None of these count as pocket-sided, though, unfortunately.

    1. Harley Han's Student Guide to Unix, a required book for Comp Sci I. It was a very straightforward, well written, and easy to read guide to Unix basics. There is a permenant crease in the spine on the page where he included a table to explain chmod settings since I had to refer to that all time until I got all of the numbers down. This is the closest thing I have to a pocket reference.

    2. Sam's Red Hat Linux (6) Unleashed -- obviously Linux has evolved a bit since I bought that one, but I still rely on it for stuff I don't do very often. If it isn't covered in that book, you don't need to know it! I believe they are still publishing this in newer editions.

    3. Sam's Teach Yourself Unix Shell Scripting in ___ Days. Another old edition tht still comes in handy. I have mixed feelings about the Teach Yourself books, but this one, also an old text book, was pretty good. It has been updated at least twice since the edition I have.

    These days I pretty much just use the Unix man pages (either in SSH or by searching Google) to find what I need to know.

    I hope this helps.

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

  7. #7
    JPC Member
    Join Date
    Apr 2004
    Posts
    1
    I'm having trouble using SSH because the wireless router I connect to has that port disabled and I don't have admin access to open that port! How can I login to my site with SSH?

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
  •