Thanks for the info.
I have gone through customlog and i understand that it is used to log the
IP and other parameters,
But I want to compare the IP address of incoming requests with IP address
present in a pre-built data structure. After comparing, the request will be
served accordingly.
Therefore, I need the source code file of apache which accepts requests and
through which I can get the IP at the initial stage.

It would be really helpful if you could provide me this info.

Thanks,

-Bhavna

On Thu, Dec 20, 2012 at 10:39 PM, Tom Evans <tevans...@googlemail.com>wrote:

> On Thu, Dec 20, 2012 at 4:20 PM, Bhavna Saini <bhavnasain...@gmail.com>
> wrote:
> > Hi Eric,
> >
> > In the previous mail you mentioned that "webserver can't write to
> /file.txt
> > from a child process". I couldn't get it properly. Please give some more
> > details of it.
>
> Eric is saying that normally only root can write to the root file
> system directory '/', and therefore a child process, typically running
> as apache or www, would not be able to write to it.
>
> >
> > Actually I want to retrieve the IP addresses of incoming requests as
> soon as
> > it reaches the server and want to save it in a file. Please let me know
> > using which source code file of apache web server I can perform it.
> >
> > Thanks,
> >
> > -Bhavna
>
> Why would you want to edit source code to do that?
>
> CustomLog logs/ip_request.log "%a %U"
>
> http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog
>
> This would create a file at $SERVER_ROOT/logs/ip_request.log with
> contents like so:
>
> 192.168.1.1 /index.html
> 192.168.1.10 /favicon.ico
>
> Cheers
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Reply via email to