Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysite.com/folder => folder.mysite.com (What's it called) 1

Status
Not open for further replies.

dkdude

Programmer
Jun 16, 2003
849
DK
Hi,

When I create folders in the root of my webhotel I can access them in two ways:

1) 2)
In my testing environment I would like to do the same -how do I configure Apache?

And, just to satisfy my curiosity, what's the latter called?

Thanks


Jakob
 
Hi

For example I put this lines in my httpd.conf :
Code:
<VirtualHost *:80>
    DocumentRoot /mysite
    ServerName mysite
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /mysite/folder
    ServerName folder.mysite
</VirtualHost>
And now I am able to access the same page as [navy][ignore][/ignore][/navy] and [navy][ignore][/ignore][/navy].

Note that I also added this in my hosts file to work for local testing :
Code:
127.0.0.1    mysite folder.mysite

And is called subdomain.
[tt] [red]folder[/red].[green]mysite[/green].[blue]com[/blue]
[red]\____/[/red] [green]\____/[/green] [blue]\_/[/blue]
[red]|[/red] [green]|[/green] [blue]|[/blue]
[red]subdomain[/red] [green]domain[/green] [blue]tld ( top level domain )[/blue][/tt]

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top