You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Anil C.Gaddam" <ch...@bsdnerds.org> on 2005/01/20 16:54:45 UTC

[users@httpd] problems with serving directory

I would like to create a virtual host mail.bsdnerds.org. But mail.bsdnerds.org
takes me to bsdnerds.org not the directory specified to be served.

Here are my current settings:

NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
<VirtualHost *:80>
RewriteEngine On
#Skip mail.bsdnerds.org
RewriteCond %{HTTP_HOST} !^(www\.)
RewriteCond %{HTTP_HOST} !^(mail\.)
RewriteCond %{HTTP_HOST} !^(lists\.)
RewriteCond %{HTTP_HOST} ^([^.]+)\.bsdnerds\.org
RewriteCond %{REQUEST_URI} !^/icons.*
RewriteRule ^(.*)$  /home/%1/public_html$1
</VirtualHost>

NameVirtualHost mail.bsdnerds.org:80
<VirtualHost mail.bsdnerds.org:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /usr/local/atmail/webmail
    ServerName mail.bsdnerds.org
    ErrorLog /var/log/mail.bsdnerd.org-error_log
    CustomLog /var/log/mail.bsdnerds.org-access_log common
</VirtualHost>


Include etc/apache2/Includes/*.conf


Sincerely yours,
Anil C. Gaddam

---------------------------------------------------------------------
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] problems with serving directory

Posted by "Andy J.M." <ap...@yourimedia.com>.
I believe ServerAlias will would help also:
http://httpd.apache.org/docs-2.0/urlmapping.html

used within <VirtualHost> after ServerName.

>-----Original Message-----
>From: Joshua Slive [mailto:jslive@gmail.com]
>Sent: Thursday, January 20, 2005 12:45 PM
>To: users@httpd.apache.org; chandra@bsdnerds.org
>Subject: Re: [users@httpd] problems with serving directory
>
>On Thu, 20 Jan 2005 10:54:45 -0500, Anil C. Gaddam <ch...@bsdnerds.org>
>wrote:
>> I would like to create a virtual host mail.bsdnerds.org. But
>mail.bsdnerds.org
>> takes me to bsdnerds.org not the directory specified to be served.
>>
>> Here are my current settings:
>
>It doesn't appear that you've read the apache name-virtual-host
>documentation.  A few clues:
>
>- If you are using NameVirtualHost *:80, that should be the *only*
>NameVirtualHost directive for that port.
>
>- Every <VirtualHost> should have a ServerName directive.
>
>- The argument to <VirtualHost> should match the one to
>NameVirtualHost.  In other words, use <VirtualHost *:80> for all your
>name-virtual-hosts.
>
>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




---------------------------------------------------------------------
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] problems with serving directory

Posted by Joshua Slive <js...@gmail.com>.
On Thu, 20 Jan 2005 10:54:45 -0500, Anil C. Gaddam <ch...@bsdnerds.org> wrote:
> I would like to create a virtual host mail.bsdnerds.org. But mail.bsdnerds.org
> takes me to bsdnerds.org not the directory specified to be served.
> 
> Here are my current settings:

It doesn't appear that you've read the apache name-virtual-host
documentation.  A few clues:

- If you are using NameVirtualHost *:80, that should be the *only*
NameVirtualHost directive for that port.

- Every <VirtualHost> should have a ServerName directive.

- The argument to <VirtualHost> should match the one to
NameVirtualHost.  In other words, use <VirtualHost *:80> for all your
name-virtual-hosts.

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