Running 2 website off 1 IP address

Paul Osman paul-trWFDORQd8hBDgjK7y7TUQ at public.gmane.org
Thu Sep 7 20:59:03 UTC 2006


On 7-Sep-06, at 4:58 PM, Jason Carson wrote:

>> Jason Carson wrote:
>>>> <VirtualHost *:80>
>>>> DocumentRoot "/var/www/localhost/htdocs/canuckster"
>>>> ServerName canuckster.org
>>>> <Directory "/var/www/localhost/htdocs/canuckster">
>>>> allow from all
>>>> Options +Indexes
>>>> </Directory>
>>>> </VirtualHost>
>>>>
>>>> <VirtualHost *:80>
>>>> DocumentRoot /var/www/localhost/htdocs/mmorpg
>>>> ServerName massivelymultiplayeronlineroleplayinggames.org
>>>> <Directory /var/www/localhost/htdocs/mmorpg>
>>>> allow from all
>>>> Options +Indexes
>>>> </Directory>
>>>> </VirtualHost>
>>>>
>>>> However, only canuckster.org works,
>>>> massivelymultiplayeronlineroleplayinggames.org doesn't work.
>>>>
>> Boy, it's been a while.
>>
>> IIRC the system is very precise, so that in the above config
>> http://assivelymultiplayeronlineroleplayinggames.org will work but
>> http://www.massivelymultiplayeronlineroleplayinggames.org will not.
>> I think you may need to add another line to fix that:
>>
>> [...]
>> <VirtualHost *:80>
>> DocumentRoot /var/www/localhost/htdocs/mmorpg
>> ServerName massivelymultiplayeronlineroleplayinggames.org
>> ServerAlias *.massivelymultiplayeronlineroleplayinggames.org      
>> <----
>> add this
>> <Directory /var/www/localhost/htdocs/mmorpg>
>> allow from all
>> Options +Indexes
>> </Directory>
>> </VirtualHost>
>> [...]
>>
>> This may not solve your problem, but it may solve some others down  
>> the
>> road. Also, keep in mind that some browsers don't send enough
>> information for the server to know what domain you want, so you might
>> want to check things out with another server -- as well as the apache
>> logs -- before being certain that the config doesn't work.
>>
>> See http://httpd.apache.org/docs/1.3/vhosts/name-based.html for  
>> more info.
>>
>> HTH,
>>
>> - Evan
>
> No, this didn't help but I will keep it in mind just in case I have
> problems down the road


It's your DNS configuration. You haven't set anything up for  
massivelymultiplayeronlineroleplayinggames.org. I just tried adding  
an entry to my host file and your VirtualHost configuration works.  
Add an A record or CNAME record for  
massivelymultiplayeronlineroleplayinggames.org and it will work just  
fine.

Cheers,

--
Paul Osman
Freelance Software Developer / Technology Consultant
http://www.eval.ca
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wini/Mailing_lists





More information about the Legacy mailing list