You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Julien <k4...@gmail.com> on 2009/07/15 13:33:37 UTC

[users@httpd] Separate Virtual Host Configuration File and domain name on log

Hello


version: apache 2.2.9

Actually I'm using a Separate Virtual Host Configuration File:
(http://httpd.apache.org/docs/2.0/vhosts/mass.html#xtra-conf)
But my problem is that I don't have the right domain name in my logs
and server-status page.

Instead of having my virtual host domain name, I have domain name of
the machine.


I use for log: LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b
\"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined



Thanks in advance.

Regards,

---------------------------------------------------------------------
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] Re: Separate Virtual Host Configuration File and domain name on log

Posted by Julien <k4...@gmail.com>.
OK it's great for log, thank you Dan Poirier.


But I have always the problem with server-status



On Wed, Jul 15, 2009 at 14:09, Dan Poirier<po...@pobox.com> wrote:
> Julien <k4...@gmail.com> writes:
>
>> version: apache 2.2.9
>>
>> Actually I'm using a Separate Virtual Host Configuration File:
>> (http://httpd.apache.org/docs/2.0/vhosts/mass.html#xtra-conf)
>> But my problem is that I don't have the right domain name in my logs
>> and server-status page.
>>
>> Instead of having my virtual host domain name, I have domain name of
>> the machine.
>>
>>
>> I use for log: LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b
>> \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
>
> Since that's just faking virtual hosts by dynamically mapping requests
> to doc roots, instead of having actual <VirtualHost> configuration, %v
> won't do what you want.
>
> Try logging %{Host}i instead of %v.
>
> --
> Dan Poirier <po...@pobox.com>
>
>
> ---------------------------------------------------------------------
> 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


[users@httpd] Re: Separate Virtual Host Configuration File and domain name on log

Posted by Dan Poirier <po...@pobox.com>.
Julien <k4...@gmail.com> writes:

> version: apache 2.2.9
>
> Actually I'm using a Separate Virtual Host Configuration File:
> (http://httpd.apache.org/docs/2.0/vhosts/mass.html#xtra-conf)
> But my problem is that I don't have the right domain name in my logs
> and server-status page.
>
> Instead of having my virtual host domain name, I have domain name of
> the machine.
>
>
> I use for log: LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b
> \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined

Since that's just faking virtual hosts by dynamically mapping requests
to doc roots, instead of having actual <VirtualHost> configuration, %v
won't do what you want.

Try logging %{Host}i instead of %v.

-- 
Dan Poirier <po...@pobox.com>


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