You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Arnold <ca...@electrichendrix.com> on 2007/12/18 04:42:24 UTC

[users@httpd] Vhost issues

Using apache 2.2.3 and at this time, we only have 2 vhosts. When trying to go to www.teknerds.net people get the other vhost (which is MUWP). Following id the vhost file:
#
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin administrator@mytimewithgod.net
    ServerName mytimewithgod.net
    #ServerAlias mytimewithgod.net *.mytimewithgod.net

    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot /srv/www/htdocs/sites/MTwG

    # if not specified, the global error log is used
    ErrorLog /var/log/apache2/MTwG-error_log
    CustomLog /var/log/apache2/MTwG-access_log combined

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName Off

    # configures the footer on server-generated documents
    ServerSignature On


    # Optionally, include *.conf files from /etc/apache2/conf.d/
    #
    # For example, to allow execution of PHP scripts:
    #
    # Include /etc/apache2/conf.d/mod_php4.conf
    #
    # or, to include all configuration snippets added by packages:
    # Include /etc/apache2/conf.d/*.conf


    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the realname directory are treated as applications and
    # run by the server when requested rather than as documents sent to the client.
    # The same rules about trailing "/" apply to ScriptAlias directives as to
    # Alias.
    #
    ScriptAlias /mailman/ "/usr/lib/mailman/cgi-bin/"

    # "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have one, and where ScriptAlias points to.
    #
    <Directory "/usr/lib/mailman/cgi-bin/">
	AllowOverride None
	Options +ExecCGI -Includes
	Order allow,deny
	Allow from all
    </Directory>


    # UserDir: The name of the directory that is appended onto a user's home
    # directory if a ~user request is received.
    #
    # To disable it, simply remove userdir from the list of modules in APACHE_MODULES
    # in /etc/sysconfig/apache2.
    #
    <IfModule mod_userdir.c>
	# Note that the name of the user directory ("public_html") cannot simply be
	# changed here, since it is a compile time setting. The apache package
	# would have to be rebuilt. You could work around by deleting
	# /usr/sbin/suexec, but then all scripts from the directories would be
	# executed with the UID of the webserver.
	UserDir public_html
	# The actual configuration of the directory is in
	# /etc/apache2/mod_userdir.conf.
	Include /etc/apache2/mod_userdir.conf
	# You can, however, change the ~ if you find it awkward, by mapping e.g.
	# http://www.example.com/users/karl-heinz/ --> /home/karl-heinz/public_html/
	#AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2
    </IfModule>


    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "/srv/www/htdocs/sites/MTwG">    
	#
	# Controls who can get stuff from this server.
	#
	Order allow,deny
	Allow from all
    
    </Directory>

</VirtualHost>

<VirtualHost *:80>
    ServerAdmin administrator@teknerds.net
    ServerName teknerds.net
    DocumentRoot /srv/www/htdocs/sites/teknerds

    # if not specified, the global error log is used
    ErrorLog /var/log/apache2/teknerds.net-error_log
    CustomLog /var/log/apache2/teknerds.net-access_log combined

    # don't loose time with IP address lookups
    HostnameLookups Off

    # needed for named virtual hosts
    UseCanonicalName Off

    # configures the footer on server-generated documents
    ServerSignature On


    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "/srv/www/htdocs/sites/teknerds">    
	#
	# Controls who can get stuff from this server.
	#
	Order allow,deny
	Allow from all
    
    </Directory>

</VirtualHost>

What do i have wrong? Thanks for any help.

Chris

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by "Neil A. Hillard" <ne...@agustawestland.com>.
Chris,

Chris Arnold wrote:
> Chris Arnold wrote:
>> Using apache 2.2.3 and at this time, we only have 2 vhosts. When trying to go to www.teknerds.net people get the other vhost (which is MUWP). Following id the vhost file:
>> #
>> NameVirtualHost *:80
>>
>> <VirtualHost *:80>
>>     ServerAdmin administrator@mytimewithgod.net
>>     ServerName mytimewithgod.net
>>     #ServerAlias mytimewithgod.net *.mytimewithgod.net
>>
<huge snip>
>> </VirtualHost>
>>
>> <VirtualHost *:80>
>>     ServerAdmin administrator@teknerds.net
>>     ServerName teknerds.net
>>     DocumentRoot /srv/www/htdocs/sites/teknerds
<huge snip>
>> </VirtualHost>
>>
>> What do i have wrong? Thanks for any help.
> Can anyone offer any pointers as to what is wrong?

Have you tried adding:

ServerAlias www.teknerds.net

to the second VH?  (Essentially, you need to tell Apache which VH to
direct the request to - www.teknerds.net is not the same as teknerds.net)

HTH,


				Neil.

-- 
Neil Hillard                    neil.hillard@agustawestland.com
AgustaWestland                  http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
            views of Westland Helicopters Ltd.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] additional dbm question

Posted by pa...@fenix.cz.
Hi, well i sent my first e-mail a bit early by mistake... it shoud have
included this:

The .htaccess file:

AuthType Digest
AuthName "private area"
AuthDigestDomain /private/
AuthDigestProvider dbm
AuthDBMType GDBM
AuthDBMGroupFile /var/www/users.db
AuthDBMUserFile  /var/www/users.db
Require valid-user
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On


DB created with:
htdbm -TGDBM -s -c /var/www/users.db user


Error:
Thu Dec 20 13:36:24 2007] [error] [client xxx.xxx.xxx.xxx] Digest: user
`user' in realm `private area' not found: /private/

... tried removing the Domain and/or the AuthName... nowthing worked
on the other hand, the file based digest works just fine... i.e.



AuthType Digest
AuthName "private area"
AuthDigestDomain /private/
AuthDigestProvider file
AuthUserFile  /var/www/localhost/htdocs/private/.htpasswd
AuthGroupFile /var/www/localhost/htdocs/private/.htgroup
Require valid-user
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On

created with:
htdigest /var/www/localhost/htdocs/admin/.htpasswd "private area" username


... what would make the dbm work with digest for me? how do i use htdbm to
manage group files or to assign users to groups? thanks in advance...

Pavel






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by Florian Schmidt <fl...@tramsch.de>.
You must not delete the ServerName directive, it should look like:

<VirtualHost *:80>
    ...
    ServerName teknerds.net
    ServerAlias www.teknerds.net
    DocumentRoot /srv/www/htdocs/sites/teknerds
    ...
</VirtualHost>


On Thu, December 20, 2007 03:30, Chris Arnold wrote:
> I am replying to the last email sent that said to put www in front on teknerds
> in that vhost. I did that and restarted apache. Same problem.
> <VirtualHost *:80>
>     ServerAdmin administrator@teknerds.net
>     ServerAlias www.teknerds.net
>     DocumentRoot /srv/www/htdocs/sites/teknerds
>
> The one about adding www.teknerds to the vhost? If so, that i replied to and
> also tried but it still directs me to the first vhost
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by Chris Arnold <ca...@electrichendrix.com>.
I am replying to the last email sent that said to put www in front on teknerds in that vhost. I did that and restarted apache. Same problem.
<VirtualHost *:80>
    ServerAdmin administrator@teknerds.net
    ServerAlias www.teknerds.net
    DocumentRoot /srv/www/htdocs/sites/teknerds

The one about adding www.teknerds to the vhost? If so, that i replied to and also tried but it still directs me to the first vhost



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by Chris Arnold <ca...@electrichendrix.com>.
Chris,

Chris Arnold wrote:
>> Can anyone offer any pointers as to what is wrong?
>>
>    
>>> you have cname records pointing to the names you have in virtualserver?
> 
> I do have cname records both in public DNS and private DNS. Still does not work from internet or intranet.

>>Did you see my reply I sent previously to the list?

The one about adding www.teknerds to the vhost? If so, that i replied to and also tried but it still directs me to the first vhost

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by "Neil A. Hillard" <ne...@agustawestland.com>.
Chris,

Chris Arnold wrote:
>> Can anyone offer any pointers as to what is wrong?
>>
>    
>>> you have cname records pointing to the names you have in virtualserver?
> 
> I do have cname records both in public DNS and private DNS. Still does not work from internet or intranet.

Did you see my reply I sent previously to the list?


				Neil.

-- 
Neil Hillard                    neil.hillard@agustawestland.com
AgustaWestland                  http://www.whl.co.uk/

Disclaimer: This message does not necessarily reflect the
            views of Westland Helicopters Ltd.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by Chris Arnold <ca...@electrichendrix.com>.
> Can anyone offer any pointers as to what is wrong?
>
   
>>you have cname records pointing to the names you have in virtualserver?

I do have cname records both in public DNS and private DNS. Still does not work from internet or intranet.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by Steve Reilly <sf...@roadrunner.com>.
> Can anyone offer any pointers as to what is wrong?
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>   
you have cname records pointing to the names you have in virtualserver?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by Chris Arnold <ca...@electrichendrix.com>.
Chris Arnold wrote:
> Using apache 2.2.3 and at this time, we only have 2 vhosts. When trying to go to www.teknerds.net people get the other vhost (which is MUWP). Following id the vhost file:
> #
> NameVirtualHost *:80
>
> <VirtualHost *:80>
>     ServerAdmin administrator@mytimewithgod.net
>     ServerName mytimewithgod.net
>     #ServerAlias mytimewithgod.net *.mytimewithgod.net
>
>     # DocumentRoot: The directory out of which you will serve your
>     # documents. By default, all requests are taken from this directory, but
>     # symbolic links and aliases may be used to point to other locations.
>     DocumentRoot /srv/www/htdocs/sites/MTwG
>
>     # if not specified, the global error log is used
>     ErrorLog /var/log/apache2/MTwG-error_log
>     CustomLog /var/log/apache2/MTwG-access_log combined
>
>     # don't loose time with IP address lookups
>     HostnameLookups Off
>
>     # needed for named virtual hosts
>     UseCanonicalName Off
>
>     # configures the footer on server-generated documents
>     ServerSignature On
>
>
>     # Optionally, include *.conf files from /etc/apache2/conf.d/
>     #
>     # For example, to allow execution of PHP scripts:
>     #
>     # Include /etc/apache2/conf.d/mod_php4.conf
>     #
>     # or, to include all configuration snippets added by packages:
>     # Include /etc/apache2/conf.d/*.conf
>
>
>     # ScriptAlias: This controls which directories contain server scripts.
>     # ScriptAliases are essentially the same as Aliases, except that
>     # documents in the realname directory are treated as applications and
>     # run by the server when requested rather than as documents sent to the client.
>     # The same rules about trailing "/" apply to ScriptAlias directives as to
>     # Alias.
>     #
>     ScriptAlias /mailman/ "/usr/lib/mailman/cgi-bin/"
>
>     # "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
>     # CGI directory exists, if you have one, and where ScriptAlias points to.
>     #
>     <Directory "/usr/lib/mailman/cgi-bin/">
> 	AllowOverride None
> 	Options +ExecCGI -Includes
> 	Order allow,deny
> 	Allow from all
>     </Directory>
>
>
>     # UserDir: The name of the directory that is appended onto a user's home
>     # directory if a ~user request is received.
>     #
>     # To disable it, simply remove userdir from the list of modules in APACHE_MODULES
>     # in /etc/sysconfig/apache2.
>     #
>     <IfModule mod_userdir.c>
> 	# Note that the name of the user directory ("public_html") cannot simply be
> 	# changed here, since it is a compile time setting. The apache package
> 	# would have to be rebuilt. You could work around by deleting
> 	# /usr/sbin/suexec, but then all scripts from the directories would be
> 	# executed with the UID of the webserver.
> 	UserDir public_html
> 	# The actual configuration of the directory is in
> 	# /etc/apache2/mod_userdir.conf.
> 	Include /etc/apache2/mod_userdir.conf
> 	# You can, however, change the ~ if you find it awkward, by mapping e.g.
> 	# http://www.example.com/users/karl-heinz/ --> /home/karl-heinz/public_html/
> 	#AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2
>     </IfModule>
>
>
>     #
>     # This should be changed to whatever you set DocumentRoot to.
>     #
>     <Directory "/srv/www/htdocs/sites/MTwG">    
> 	#
> 	# Controls who can get stuff from this server.
> 	#
> 	Order allow,deny
> 	Allow from all
>     
>     </Directory>
>
> </VirtualHost>
>
> <VirtualHost *:80>
>     ServerAdmin administrator@teknerds.net
>     ServerName teknerds.net
>     DocumentRoot /srv/www/htdocs/sites/teknerds
>
>     # if not specified, the global error log is used
>     ErrorLog /var/log/apache2/teknerds.net-error_log
>     CustomLog /var/log/apache2/teknerds.net-access_log combined
>
>     # don't loose time with IP address lookups
>     HostnameLookups Off
>
>     # needed for named virtual hosts
>     UseCanonicalName Off
>
>     # configures the footer on server-generated documents
>     ServerSignature On
>
>
>     #
>     # This should be changed to whatever you set DocumentRoot to.
>     #
>     <Directory "/srv/www/htdocs/sites/teknerds">    
> 	#
> 	# Controls who can get stuff from this server.
> 	#
> 	Order allow,deny
> 	Allow from all
>     
>     </Directory>
>
> </VirtualHost>
>
> What do i have wrong? Thanks for any help.
Can anyone offer any pointers as to what is wrong?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] dbm group files with dtdbm

Posted by Joshua Slive <jo...@slive.ca>.
On Dec 19, 2007 11:13 PM,  <pa...@fenix.cz> wrote:
> Hi, how do i use the htdbm to create dbm group files?
> ...seems like this can only done only by the deprecated dbmmanage.. ?
> btw, what makes the difference using a single or two dbs for users and
> groups? what are your personal preferences and why?

I don't think dbmmanage is deprecated, but there is also:
http://httpd.apache.org/docs/2.2/programs/htdbm.html

I don't have any preference between one or two dbs.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] dbm group files with dtdbm

Posted by pa...@fenix.cz.
Hi, how do i use the htdbm to create dbm group files?
...seems like this can only done only by the deprecated dbmmanage.. ?
btw, what makes the difference using a single or two dbs for users and
groups? what are your personal preferences and why?

thanks for the quick reply, Pavel


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Vhost issues

Posted by Norman Peelman <np...@cfl.rr.com>.
Chris Arnold wrote:
> Using apache 2.2.3 and at this time, we only have 2 vhosts. When trying to go to www.teknerds.net people get the other vhost (which is MUWP). Following id the vhost file:
> #
> NameVirtualHost *:80
>
> <VirtualHost *:80>
>     ServerAdmin administrator@mytimewithgod.net
>     ServerName mytimewithgod.net
>     #ServerAlias mytimewithgod.net *.mytimewithgod.net
>
>     # DocumentRoot: The directory out of which you will serve your
>     # documents. By default, all requests are taken from this directory, but
>     # symbolic links and aliases may be used to point to other locations.
>     DocumentRoot /srv/www/htdocs/sites/MTwG
>
>     # if not specified, the global error log is used
>     ErrorLog /var/log/apache2/MTwG-error_log
>     CustomLog /var/log/apache2/MTwG-access_log combined
>
>     # don't loose time with IP address lookups
>     HostnameLookups Off
>
>     # needed for named virtual hosts
>     UseCanonicalName Off
>
>     # configures the footer on server-generated documents
>     ServerSignature On
>
>
>     # Optionally, include *.conf files from /etc/apache2/conf.d/
>     #
>     # For example, to allow execution of PHP scripts:
>     #
>     # Include /etc/apache2/conf.d/mod_php4.conf
>     #
>     # or, to include all configuration snippets added by packages:
>     # Include /etc/apache2/conf.d/*.conf
>
>
>     # ScriptAlias: This controls which directories contain server scripts.
>     # ScriptAliases are essentially the same as Aliases, except that
>     # documents in the realname directory are treated as applications and
>     # run by the server when requested rather than as documents sent to the client.
>     # The same rules about trailing "/" apply to ScriptAlias directives as to
>     # Alias.
>     #
>     ScriptAlias /mailman/ "/usr/lib/mailman/cgi-bin/"
>
>     # "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
>     # CGI directory exists, if you have one, and where ScriptAlias points to.
>     #
>     <Directory "/usr/lib/mailman/cgi-bin/">
> 	AllowOverride None
> 	Options +ExecCGI -Includes
> 	Order allow,deny
> 	Allow from all
>     </Directory>
>
>
>     # UserDir: The name of the directory that is appended onto a user's home
>     # directory if a ~user request is received.
>     #
>     # To disable it, simply remove userdir from the list of modules in APACHE_MODULES
>     # in /etc/sysconfig/apache2.
>     #
>     <IfModule mod_userdir.c>
> 	# Note that the name of the user directory ("public_html") cannot simply be
> 	# changed here, since it is a compile time setting. The apache package
> 	# would have to be rebuilt. You could work around by deleting
> 	# /usr/sbin/suexec, but then all scripts from the directories would be
> 	# executed with the UID of the webserver.
> 	UserDir public_html
> 	# The actual configuration of the directory is in
> 	# /etc/apache2/mod_userdir.conf.
> 	Include /etc/apache2/mod_userdir.conf
> 	# You can, however, change the ~ if you find it awkward, by mapping e.g.
> 	# http://www.example.com/users/karl-heinz/ --> /home/karl-heinz/public_html/
> 	#AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2
>     </IfModule>
>
>
>     #
>     # This should be changed to whatever you set DocumentRoot to.
>     #
>     <Directory "/srv/www/htdocs/sites/MTwG">    
> 	#
> 	# Controls who can get stuff from this server.
> 	#
> 	Order allow,deny
> 	Allow from all
>     
>     </Directory>
>
> </VirtualHost>
>
> <VirtualHost *:80>
>     ServerAdmin administrator@teknerds.net
>     ServerName teknerds.net
>     DocumentRoot /srv/www/htdocs/sites/teknerds
>
>     # if not specified, the global error log is used
>     ErrorLog /var/log/apache2/teknerds.net-error_log
>     CustomLog /var/log/apache2/teknerds.net-access_log combined
>
>     # don't loose time with IP address lookups
>     HostnameLookups Off
>
>     # needed for named virtual hosts
>     UseCanonicalName Off
>
>     # configures the footer on server-generated documents
>     ServerSignature On
>
>
>     #
>     # This should be changed to whatever you set DocumentRoot to.
>     #
>     <Directory "/srv/www/htdocs/sites/teknerds">    
> 	#
> 	# Controls who can get stuff from this server.
> 	#
> 	Order allow,deny
> 	Allow from all
>     
>     </Directory>
>
> </VirtualHost>
>
> What do i have wrong? Thanks for any help.
>
> Chris
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>   
  Anything  that doesn't match a vhost automatically gets the first 
vhost defined. You need to add:
www.teknerds.net to the ServerAlias directive for the teknerds vhost. 
That's why mtwg works with or without www in front of it.

Norm

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Vhost issues

Posted by Axel-Stephane SMORGRAV <Ax...@europe.adp.com>.
You can fix that by adding "ServerAlias www.teknerds.net" to the second VHost.

BTW, next time you post a configuration, please remove all the comments that make it unreadable unless they are relevant for your problem...

-ascs
 
-----Message d'origine-----
De : Chris Arnold [mailto:carnold@electrichendrix.com] 
Envoyé : mardi 18 décembre 2007 04:42
À : users
Objet : [users@httpd] Vhost issues

Using apache 2.2.3 and at this time, we only have 2 vhosts. When trying to go to www.teknerds.net people get the other vhost (which is MUWP). Following id the vhost file:
#
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin administrator@mytimewithgod.net
    ServerName mytimewithgod.net
    #ServerAlias mytimewithgod.net *.mytimewithgod.net

    DocumentRoot /srv/www/htdocs/sites/MTwG
    ErrorLog /var/log/apache2/MTwG-error_log
    CustomLog /var/log/apache2/MTwG-access_log combined
    HostnameLookups Off
    UseCanonicalName Off
    ServerSignature On

    ScriptAlias /mailman/ "/usr/lib/mailman/cgi-bin/"

    <Directory "/usr/lib/mailman/cgi-bin/">
	AllowOverride None
	Options +ExecCGI -Includes
	Order allow,deny
	Allow from all
    </Directory>

    <IfModule mod_userdir.c>
	UserDir public_html
    </IfModule>

    <Directory "/srv/www/htdocs/sites/MTwG">    
	Order allow,deny
	Allow from all
    </Directory>

</VirtualHost>

<VirtualHost *:80>
    ServerAdmin administrator@teknerds.net
    ServerName teknerds.net
    DocumentRoot /srv/www/htdocs/sites/teknerds

    ErrorLog /var/log/apache2/teknerds.net-error_log
    CustomLog /var/log/apache2/teknerds.net-access_log combined

    HostnameLookups Off
    UseCanonicalName Off
    ServerSignature On

    <Directory "/srv/www/htdocs/sites/teknerds">    
	Order allow,deny
	Allow from all
    
    </Directory>

</VirtualHost>

What do i have wrong? Thanks for any help.

Chris

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org