Web Hosting Talk







View Full Version : removing www from hostname


gridlokd
05-07-2002, 02:49 AM
Hi,

Does anyone know how to have no www for hostname in the GUI fo example to just have the domain name like so:

http://domainname.com

and not have it redirect to an actual hostname.

Any help appreciated

Mxhub
05-07-2002, 05:19 AM
In the "Web Server Aliases", just put yourdomain.com .

CmptrWz
05-07-2002, 06:04 AM
I think you leave the www out when you initially set up the site. Of course, after adding www.domain.com in the aliases it will get redirected to domain.com

gridlokd
05-20-2002, 10:47 PM
The problem is the GUI does not allow yout o leave out www when setting up a site, says it needs a hostname to go with the domain name

gridlokd
05-21-2002, 12:17 AM
Actually, I did a search and found the old post regarding this. I can now have the domain without the www, by configuring the httpd.conf, commenting out rewrite permissions, but now the problem is I also would like to have the www resolve to the domain.com as well, just not have domain.com always redirect to www...do you need a second IP to have both seperately work in apache as a virtual host? because adding the servername www.domain.com and servername domain.com as virtual hosts under the same IP pointing to the same web root diertory is only allowing one to work, the domain.com and not the www.domain.com

I'm trying to setup domain stacking on one account

gridlokd
05-21-2002, 01:11 AM
Just to clear up that last post a little bit more.,

This is what I've got:

<VirtualHost x.x.x.x.x>
ServerName domain.com
ServerAdmin admin
DocumentRoot /home/sites/site34/web/web2
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>
<VirtualHost x.x.x.x.x>
ServerName www.domain.com
ServerAdmin admin
DocumentRoot /home/sites/site34/web/web2
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>


Now only domain.com is pointing to site34's web2 directory, www.domain.com for some reason doesn't work with the directory, it just brings up a 404

site34 is the domain both entries above point too, and works fine

SO yeah!

The DNS for both domains resolve, www and domain.com both resolve, it just seems like www.domain.com doesnt want to read from home/sites/site34/web/web2



Anyone know what might be wrong?