httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clay Porter <clay.por...@gmail.com>
Subject Re: [users@httpd] Name Virtual Host Weirdness
Date Fri, 13 Jan 2012 16:13:13 GMT
Thanks for the info.  I will try what you suggested.

I'm pretty new to all of this, so I hope you don't mind a n00b
question.  What do you mean by a "defunct vhost"?  Could I trouble you
for an example?

Thanks again.

Clay

On Thu, Jan 12, 2012 at 4:46 PM, Steve Swift <Swifty@swiftys.org.uk> wrote:
> It all looks correct to me. Can you exchange the order of the VirtualHost
> definitions? The first Virtualhost defined is the one that gets used if
> anything goes wrong with allocating a request to a particular vhost, so you
> often end up thinking you are using the first Vhost  when in fact you are
> using the default vhost.
>
> I tend to define a defunct vhost first - one with nothing in the
> documentroot, except an error document which is served in response to every
> URI. This makes errors less puzzling.
>
> On 12 January 2012 21:21, Clay Porter <clay.porter@gmail.com> wrote:
>>
>> All,
>>
>> I have two virtual hosts set up that look like the following (I've
>> tried to only include the information pertaining to the problem, i,e,
>> I've removed the actual rewrite rules, etc):
>>
>> Listen *:38215
>> NameVirtualHost *:38215
>>
>> <VirtualHost *:38215>
>>    DocumentRoot /www/sitea
>>    ServerName www.sitea.com
>>    ErrorLog logs/sitea-error.log
>>    CustomLog logs/sitea-access.log common
>>
>>    <IfModule mod_rewrite.c>
>>        RewriteEngine on
>> #        RewriteLog  logs/sitea-rewrite.log
>> #        RewriteLogLevel 3
>>    </IfModule>
>> </VirtualHost>
>>
>> <VirtualHost *:38215>
>>    DocumentRoot /www/siteb
>>    ServerName www.siteb.com
>>    ErrorLog logs/siteb-error.log
>>    CustomLog logs/siteb-access.log common
>>
>>    <IfModule mod_rewrite.c>
>>        RewriteEngine on
>>        RewriteLog  logs/sitea-rewrite.log
>>        RewriteLogLevel 3
>>    </IfModule>
>> </VirtualHost>
>>
>> What's happening is that all of the log information is being written
>> to sitea's log files, no matter which virtual host I hit.  The log
>> files for siteb are being created at start up but they are empty.  I'm
>> afraid this weirdness might also be affecting the rewrite rules
>> specific to the sites. Does anyone know why this might be happening?
>>
>> I'm using Apache 2.2.3 on a RHEL 5.6 box.
>>
>> Thanks for any help you can give.  Please let me know if I need to
>> provide more info than this.
>>
>> ---------------------------------------------------------------------
>> 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
>>
>
>
>
> --
> Steve Swift
> http://www.swiftys.org.uk

---------------------------------------------------------------------
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


Mime
View raw message