FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

LinkBack Thread Tools
Old 06-08-2010, 06:53 PM
Default http://.com is not redirected to http://www..com


I have some problem with apache virtual hosts configuration.
When I enter http://www.<myhost>.com in browser, I get the right
page. But when I enter http://<myhost>.com, I'm redirected to
default (other) page on the server. Where could be the problem?
Should not the ServerAlias directive take care of it?


# more /etc/apache2/vhosts.d/30_<myhost>_vhost.conf
<VirtualHost *:80>
ServerName www.<myhost>.com
ServerAlias <myhost>.com
Include /etc/apache2/vhosts.d/<myhost>_vhost.include
<IfModule mpm_peruser_module>
ServerEnvironment apache apache

# more /etc/apache2/vhosts.d/<myhost>_vhost.include
ServerAdmin root@<myhost>.com
DocumentRoot "/var/www/<myhost>/htdocs"
<Directory "/var/www/<myhost>/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/<myhost>/cgi-bin/"
<Directory "/var/www/<myhost>/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all

(Note: my real domain name is substituted with <myhost>)

__________________________________________________ _____________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.

Thread Tools

All times are GMT. The time now is 12:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org