Solved

A dummy question for the experts

Posted on 1998-09-23
10
161 Views
Last Modified: 2013-12-25
I've seen a number of scripts which allow a user to set up free hosting accounts on a server with the resulting URL structured like "http:www.domain.com/user_name". How can I do this with the URL structured like this: "http://www.user_name.domain.com"?


T.Y.I.A.
0
Comment
Question by:dhinckle
  • 5
  • 2
  • 2
  • +1
10 Comments
 

Author Comment

by:dhinckle
ID: 1828765
Edited text of question
0
 
LVL 4

Expert Comment

by:raoool
ID: 1828766
User_Name in the first instance is simply a directory on the Web server.

User_name in the second example is a machine name meaning you must assign an IP address (though some servers can spoof multiple machines on a single IP address -- depends on your server software) to the user_name and make appropriate entries into the authoritative Name Server for that Domain.
0
 

Author Comment

by:dhinckle
ID: 1828767
raoool,

If I understand you correctly, for this to work, I would first have to find a Web server that provides this "spoofing" feature. Is this feature common in Web servers or should I post this question elsewhere?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 4

Expert Comment

by:raoool
ID: 1828768
dhinckle,

Most Web servers provide a variation for purposes of hosting multiple Domains on a single machine -- either the Web server software or as an option/3rd party addon. Some respond to multiple IP addresses, others use of different ports for different names. Multiple machine names is a slightly different issue (though seemingly less complex). I'd throw it at the manufacturer of whatever server you'd like to use and see what they say.

Will do some playing next time I'm working on IIs (next couple days) and re-post if I find anything useful.
0
 
LVL 1

Expert Comment

by:alweiner
ID: 1828769
1) Ask the ISP to set up subdomains of the form:
   user_name  at domain.com  for each user_name that you want.
   They should all point to the same IP as domain.com

2) Write a script, located at domain.com that parses the address
   used to reach the page and move the visitor to
   domain.com/user_name
0
 

Author Comment

by:dhinckle
ID: 1828770
alweiner,

Please forgive my ignorance.

Regarding "ask the ISP to set up subdomains of the form: user_name  at domain.com  for each user_name that you want"

Is this something they have to be continually doing or is it a one time thing?

What I'm looking for is a method of automating the complete task and have it done in real time.

Thanks for your patience...

0
 
LVL 1

Expert Comment

by:alweiner
ID: 1828771
It's a continuous thang (sorry). The problem is, an internet name "somewhere.domain.com" represents a specific address on the internet that is assigned from a domain name server (it's a giant database of names and IP numbers) so that when somebody enters "somewhere.domain.com" in their browser, the DNS changes it to something looking like: 108.192.137.40.

There's no way that I'm aware, w/o placing this info into a DNS for an arbitrary person on the internet to be able to find the IP address by giving the name.  Thus, if you want to be able to keep changing the main part of the address name, you have to keep making DNS entries.  That's the way the "freebie" domain hosting companies do it...
0
 

Author Comment

by:dhinckle
ID: 1828772
alweiner,

I appreciate your time but this answer is not acceptable.

F.Y.I.  I found an old thread which references this issue at http://www.iea-software.com/lists/9707/ntisp/index.htm#518

A working example of this stuff (completely automated) can be found at hypermart.net




0
 
LVL 7

Accepted Solution

by:
jconde earned 50 total points
ID: 1828773
dhinckle,

there's several way's to do this....
using CGI, what you would do (I've done it before) is the following:

You register a domain that has the same IP address as your server.  your servers default page is a ssi script (usually with extension .shtml) that reads the REMOTE_HOST variable, and depending on its value you print the corresponding html code.
It's easy, but not so good!

The best way to approach this is by defining a virtual host or an alias. In that way, you can have username.domain.com with no ip registration involved.  I suggest you check the apache virtual host documentation to get more information on virtual hosts.  Its pretty simple, if you need help please let me know about it.


Regards,
Jorge
0
 

Author Comment

by:dhinckle
ID: 1828774
Jorge,

Thank you for the input, I'll check out the Apache site.

I KNOW I'll be needing more help :-) as I'm totally ignorant when it comes to this stuff.

This question is closed and the points have been awarded.

David Hinckle
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question