PowWeb Forums - The Perfect Community for the Perfect Host  

Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more.

Go Back   PowWeb Community Forums > The PowWeb Platform > Domain Names / DNS
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Closed Thread
 
Thread Tools
Old 3-12-05, 04:35 PM   #1
Asraizmum
Guest
 
Posts: n/a
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
 
Old 3-12-05, 05:19 PM   #2
tbonekkt
 
Join Date: Dec 2002
Location: TX
Posts: 12,382
Reputation: 248
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.
tbonekkt is offline  
Old 3-12-05, 06:36 PM   #3
Asraizmum
Guest
 
Posts: n/a
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 07:01 PM.. Reason: Add a little bit
 
Old 3-12-05, 08:27 PM   #4
stevel
XPW
 
stevel's Avatar
 
Join Date: Jun 2002
Location: New Hampshire, USA
Posts: 9,464
Reputation: 265
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
stevel is offline  
Old 3-13-05, 11:35 AM   #5
Asraizmum
Guest
 
Posts: n/a
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"?
 
Old 3-13-05, 11:51 AM   #6
B&T
Just tryin' to help
 
B&T's Avatar
 
Join Date: Jan 2003
Location: along the journey
Posts: 8,036
Reputation: 125
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
B&T is offline  
Old 3-13-05, 10:53 PM   #7
Pig
foo
 
Pig's Avatar
 
Join Date: Jan 2003
Location: Seattle-ish
Posts: 2,597
Reputation: 106
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.
__________________
webhead.cc
Pig is offline  
Old 3-14-05, 06:48 AM   #8
stevel
XPW
 
stevel's Avatar
 
Join Date: Jun 2002
Location: New Hampshire, USA
Posts: 9,464
Reputation: 265
Well, actually, .htm does stand for HyperText Markup - it's just .html without the "Language" letter.
__________________
Steve
stevel is offline  
Old 3-14-05, 08:18 AM   #9
tbonekkt
 
Join Date: Dec 2002
Location: TX
Posts: 12,382
Reputation: 248
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.
tbonekkt is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:51 PM.


Contents ©PowWeb, Inc. ~ vBulletin, Copyright 2000-2007 Jelsoft Enterprises Limited.