/    Sign up×
Community /Pin to ProfileBookmark

basic host tech: www and public_html directory

I have a small persional web-site, when users visit
[url]http://www.mysite.com/friend/hello.html[/url]

actually the file is:
/public_html/friend/hello.html

I am really confused:
why does “http://www.mysite.com” equal to “/public_html”?

I guess it is caused by a file www (permission is lrwxrwxrwx) to direct “http://www.mysite.com” to “/public_html”.

right?

do all hosts use symbolic link file “www” to direct “http://www.xxxx.yyy” to a special directory (such as “public_html”)?

thx

to post a comment
Web Hosting

2 Comments(s)

Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYNov 13.2005 — yep it's the "public" directory on the server/shared server in which you put your files
Copy linkTweet thisAlerts:
@mdoignyNov 25.2005 — [B]The www is a dns thing[/B].

When a client access your site, it first looks for the server IP by performing a dns query. This leads to your site.

Then the client issues a query to your site.

What the server answers depends on the server configuration. On mine, the 'public' directory is called 'webpages' and it does not need to be 'shared' (shared is a LAN thing, the internet shouldn't be able to access LAN shared pages)

The server can also issue a different page based on the host name (for instance you could have multiple domain names www.domain.com, pictures.domain.com, www.domain.org). Each domain pointing to the same server. The server decides whitch page to deliver based on the HOST: request header. This is called virtual hosting (your single computer responds as if it's a 'multiple' computer)
×

Success!

Help @html20009876 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...