The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 07-01-2003
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
In your first virtual host, you specify your domain as spetnik.d2g.com. I don't have a way to test this, but to my way of thinking, this would be a host.domain.com. (Your other one works because it is has only a domain - e-feedback.org )

<VirtualHost *:80>
ServerName spetnik.d2g.com
ServerAlias spetnik.d2g.com www.spetnik.d2g.com
ServerAdmin aspetner@spetnik.com
DocumentRoot /var/www/spetnik/html/

Part of the documentation states:
Quote:
Many servers want to be accessible by more than one name. This is possible with the ServerAlias directive, placed inside the <VirtualHost> section. For example if you add this to the first <VirtualHost> block above

ServerAlias domain.tld *.domain.tld
then requests for all hosts in the domain.tld domain will be served by the www.domain.tld virtual host.
Since you probably can't change servername to d2g.com, try the following instead (found in the FAQ section of Apache's documentation):
Quote:
There are two techniques to implement canonical hostnames:

Use mod_rewrite as described in the "Canonical Hostnames" section of the URL Rewriting Guide.
Use name-based virtual hosting:
NameVirtualHost *

<VirtualHost *>
ServerName www.example.net
ServerAlias example.com
Redirect permanent / http://www.example.com/
</VirtualHost>

<VirtualHost *>
ServerName www.example.com
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>
Worth a shot, anyway.