Project

General

Profile

[Solved] which struct field is used by $HTTP['host'] compare?

Added by cst_zf almost 9 years ago

I want do things below:

a url from a.com is processed by the plugin(hook uri_clean) and i want to generate the log to file by mod_accesslog ($HTTP['host'] == b.com)

I think i can handle it by modifying con.uri.authority after reading configfile-glue.c , but it doesn't work.

Can anyone help me?


Replies (1)

RE: [Solved] which struct field is used by $HTTP['host'] compare? - Added by gstrauss 9 months ago

The struct field is con->uri.authority. However, the lighttpd.conf config condition for ($HTTP['host'] == b.com) is already determined earlier in the request, so changing con->uri.authority afterwards does not change the mod_accesslog config. You can send an external redirect back to the client to have the client make a request to "b.com" or you can write you own module to write out alternative access logs or trace as you see fit.

    (1-1/1)