Results 1 to 9 of 9

Thread: What is htdocs, anyway?

  1. #1
    Asraizmum
    Guest

    Question What is htdocs, anyway?

    I managed to get my site working after a fasion.

    All this mooking around has made me wonder,
    what is an "htdocs'" folder, anyway?

    Is it kind of a protocol thing, that the domain looks first to this folder>

    On one of my sites, I found the easiest means of doing subdomains was by creating a number of folders with the name of my subdomain in the same folder my htdocs folder lives in (not IN the htdocs folder), and putting htdocs folders in them, and then building the site within that. This method is particularly good where the subdomain actually belongs to someone else. All the stuff is in a neat package in the subdomain htdoces.

    Is there any problem with this?

    What does having these htdocs folders in the subdomains do? What are these htdocs folders, and how do they relate to the main htdocs?

    Just wondering on a Sunday morning. I was hoping it might help me understand whats happening.

    D

  2. #2

    Join Date
    Dec 2002
    Location
    TX
    Posts
    12,382
    Rep Power
    29
    htdocs is the directory that the web server software (Apache) looks for files to serve on your domain. Anything you want web-viewable needs to be inside htdocs. It applies to subdomains as well.

  3. #3
    Asraizmum
    Guest
    Thanks Tom,

    Is Apache yet another thing to learn about? Are there any *very* brief and simple explainations, for the totally ignorant?

    I've recently taught myself CSS stuff, and just managed to configure my AV network so that all my stuff (tv/cable/video/dvd/xbox/ps2/camcorder) feeds into my partner's capture card so they can do AV editing. That was hellish, especialy getting the sound input right. Fixed the cybershot camera the main division of Sony told me was irreperable (I hit the "reset" button I found). Working on how to present AV files on the web, all between my uni stuff.

    I'm slowly going to look at .htaccess, and try to figure that out. But all the PHPs and Perls and SQLs and stuff make me want to go on retreat, and do nothing but chant "Om mane padme hum" for the next 15 years. Do things really need to be this complicated?

    OK, now that I've had a whinge, next question...

    There seems to be two ways of "doing" sub-domains.

    One is to put a folder for the subdomain in the htdocs file, and not put another htdocs folder in the subdomain folder. To do this you need to do some really obscure (to me) .htaccess magick.

    The other is to put a subdomain folder in the root directory alongside the htdocs folder, and to put another htdocs folder in the subdomain folder, and then put "stuff" in your subdomain/htdocs/ That doesn't seem to require .htaccess. So, what is happening. How does all this work? Does either method create special problems or have special benefits?

    Also, what is the difference between a "file.htm" and "file.html" ?

    D
    Last edited by Asraizmum; 3-12-05 at 08:01 PM. Reason: Add a little bit

  4. #4
    XPW stevel's Avatar
    Join Date
    Jun 2002
    Location
    New Hampshire, USA
    Posts
    9,464
    Rep Power
    27
    You don't have to learn Apache, unless you want to get involved with writing .htaccess files, in which case you will want to study those.This is the reference I use for that.[/url]

    There's no difference between .html and .htm - it's just a convention, .htm being more popular among Windows users (for no really good reason.)

    The "folder above htdocs" subdomain method relies on a feature PowWeb implemented in their web server - you don't need to know how it works. It is a simpler method and is the one I'd recommend. This method is relatively new at PowWeb (within the last year), so a lot of people do it the "old" way with .htaccess.
    Steve

  5. #5
    Asraizmum
    Guest
    Thanks Steve,

    Yes, I use the folder-above-htdocs method. Is there an easy way to point another domain name to such a subdirectory, instead of to a 'folder-within-htdocs"?

  6. #6
    Just tryin' to help B&T's Avatar
    Join Date
    Jan 2003
    Location
    along the journey
    Posts
    8,036
    Rep Power
    24
    Quote Originally Posted by tbonekkt
    htdocs is the directory that the web server software (Apache) looks for files to serve on your domain. Anything you want web-viewable needs to be inside htdocs. It applies to subdomains as well.
    Depending on how technical we want to get here . . . when you set up the Apache config file you specify the DocumentRoot. The typical, and the defualt file as it comes, uses htdocs. But you could make it anything. There is really nothing special about the word htdocs. Obviously PowWeb uses it.
    Enhance your PowWeb experience @ B&T's Tips & Scripts
    Got some free time? You can find Nothing of Value @ PrettyWorthless.com

  7. #7
    foo Pig's Avatar
    Join Date
    Jan 2003
    Location
    Seattle-ish
    Posts
    2,597
    Rep Power
    18
    Just a small correction. .htm does not stand for hyper text markup. It's just that windows used to have a 3 letter limit on file extensions, and it couldn't accept .html. This is no longer the case, but some people still use .htm for no reason.

  8. #8
    XPW stevel's Avatar
    Join Date
    Jun 2002
    Location
    New Hampshire, USA
    Posts
    9,464
    Rep Power
    27
    Well, actually, .htm does stand for HyperText Markup - it's just .html without the "Language" letter.
    Steve

  9. #9

    Join Date
    Dec 2002
    Location
    TX
    Posts
    12,382
    Rep Power
    29
    Quote Originally Posted by B&T
    Depending on how technical we want to get here . . . when you set up the Apache config file you specify the DocumentRoot. The typical, and the defualt file as it comes, uses htdocs. But you could make it anything. There is really nothing special about the word htdocs. Obviously PowWeb uses it.
    Correct - I just didn't feel the need to elaborate and confuse the issue.

Posting Permissions

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