PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.win > Subdomains and DNS
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.win Web servers for MS Windows and NT.

Subdomains and DNS

Réponse
 
LinkBack Outils de la discussion
Vieux 30/09/2005, 02h37   #1 (permalink)
EOZyo
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Subdomains and DNS

Hi, I just started a few time ago to work with Apache and I found this
tool a great way to keep my website without (lots of) limitations.

My site hosts music and I would like to set subdomains for each
language, i.e. english.mydomain.com which goes to
www.mydomain.com/english

The configuration I have typed in apache for this, it's almost the same
configuration I've found almost everywhere, which is the following:

Listen 80

ServerName localhost:80

<VirtualHost *>
ServerAlias www.mydomain.com
DocumentRoot "/www"
ServerName www.mydomain.com
</VirtualHost>

<VirtualHost english.mydomain.com>
DocumentRoot "/www/english"
ServerName english.mydomain.com
ServerAlias english.mydomain.com
</VirtualHost>

<VirtualHost lyrics.eozyo.info>
DocumentRoot "/www/lyrics"
ServerName lyrics.eozyo.info
ServerAlias lyrics.eozyo.info
</VirtualHost>

I've also created the DNS entries for english.mydomain.com and
lyrics.mydomain.com both show an "A Record" to my current IP address (I
work with dynamic IP but I can updated it automatically every single
time it changes, approx. every 3 days).

My DNS entries are as it follows:

Domain Type Class TTL Answer

mydomain.com A IN 120 MY IP
english.mydomain.com. A IN 120 MY IP
lyrics.mydomain.com A IN 120 MY IP

I've stoped making modifications to my httpd.conf cos I cannot get it
right.

Sometimes I get to work english.mydomain.com, but the www.mydomain.com,
mydomain.com and yrics.mydomain.com display the same root director,
i.e.:

english.mydomain.com goes to /www/english/
lyrics.mydomain.com goes to /www/english/ not to /www/lyrics/
www.mydomain.com goes to /www/english/ not to /www/
mydomain.com goes to /www/english/ not to /www/

That's my problem, I've been looking for information for the past 3
days and I've made hundreds of modifications and I don't seem to get it
right, maybe this must be written in ".htaccess" file (which I'm not
very familiar with) or in the "httpd.conf" file; at this point i'm
totally lost, please any advise would be great and I'll really
appreciate it.

Thanks EOZyo.

  Réponse avec citation
Vieux 01/10/2005, 14h17   #2 (permalink)
Klaus Johannes Rusch
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Subdomains and DNS

EOZyo wrote:

> My site hosts music and I would like to set subdomains for each
> language, i.e. english.mydomain.com which goes to
> www.mydomain.com/english


> The configuration I have typed in apache for this, it's almost the same
> configuration I've found almost everywhere, which is the following:
>
> Listen 80
>
> ServerName localhost:80


Add NameVirtualHost <ipaddress>

>
> <VirtualHost <ipaddress>>
> ServerAlias www.mydomain.com
> DocumentRoot "/www"
> ServerName www.mydomain.com
> </VirtualHost>
>
> <VirtualHost <ipaddress>>
> DocumentRoot "/www/english"
> ServerName english.mydomain.com
> ServerAlias english.mydomain.com
> </VirtualHost>



The way you have set this up currently, english.mydomain.com does not
redirect to www.mydomain.com/english but simply maps this to a different
content root.

As long as you use relative links in the content only that will work
okay, but as soon as you have something like <a href="/">Home</a> this
will work differently on english.mydomain.com and www.mydomain.com.

If you want english.mydomain.com only as an alias, add

Redirect / http://www.mydomain.com/english/

--
Klaus Johannes Rusch
KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h49.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08570 seconds with 10 queries