How to enable x-client-ip address in apache webserver LogFormat?


 
Thread Tools Search this Thread
Top Forums Web Development How to enable x-client-ip address in apache webserver LogFormat?
# 1  
Old 04-27-2017
How to enable x-client-ip address in apache webserver LogFormat?

how to enable x-client-ip address in apache webserver LogFormat
i tried below option, but no luck...
Code:
1. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

2. LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy

3. SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded

4. CustomLog "logs/access_log" combined env=!forwarded

5. CustomLog "logs/access_log" proxy env=forwarded

any help greatly appreciated

Last edited by Don Cragun; 04-27-2017 at 03:09 PM.. Reason: Fix CODE tags.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Runtime Error Enable user directory apache

Hi I am exactly according to this link CentOS 6 - Apache httpd - Enable Userdir : Server World I Enabled userDirectory Server version: Apache/2.2.15 CentOS release 6.8 (Final) But Iget this Error Forbidden You don't have permission to access /~mn/index.html on this server Goal... (2 Replies)
Discussion started by: mnnn
2 Replies

2. Shell Programming and Scripting

Apache webserver troubleshooting

Need assistance in getting apache installation troubleshooting.. - Compiled source code of apache webserver , Installed and configured apache, - started apache web server with no errors. - web browser doesnt open any pages . say "Page cannot be displayed". Need troubleshooting . - When i... (12 Replies)
Discussion started by: ajayram_arya
12 Replies

3. UNIX for Advanced & Expert Users

apache webserver url redirection

I need help in apache url redirection: I have added the below command in httpd.conf and it is working fine. Redirect http://xyz.com/site/homehttp://abc.com/site/home Can we set a rule such that http://xyz.com/site/* -> http://abc.com/site/* is applied For... (0 Replies)
Discussion started by: raghur77
0 Replies

4. Web Development

client authentication in sunone 7.0 webserver

hi, I am using sunone 7.0 webserver. The webserver instance is configured for https and i want to do client authentication for specific resources. I dont want to do any client authentication for the other resources. I was able to do a complete client auth for my webserver but unable to do... (0 Replies)
Discussion started by: pcs.abhishek
0 Replies

5. IP Networking

ip address of a client

A client(PC) connects to an unix server via terminal emulator. How can I obtain that client's IP address? The unix server is an old SVR4.2 (NCR) and the "who" command does not show ip addresses. I need a command or a shell script or a C/C++ program that will help me to obtain the client's... (6 Replies)
Discussion started by: ka2d2
6 Replies

6. UNIX for Advanced & Expert Users

apache webserver

Can I set up an apache webserver on Mandriva? Looking for the easiest webserver program to install basic webserver just for home use. Any ideas/suggestions much appreciated..... (2 Replies)
Discussion started by: jo calamine
2 Replies

7. UNIX for Dummies Questions & Answers

client IP address

when working on a telnet is it possible the client machine accessing the server machine supply its IP Address to the server machine . The only other shell i can use is the TCL shell. (2 Replies)
Discussion started by: rolly
2 Replies

8. UNIX for Dummies Questions & Answers

enable php & java support in apache

Hello guys, I am in desperate need for this information: I have an apache server running on linux (suse 8.1) I am unable to run php or java code on it, and I wonder what is wrong. for the php case, the browser asks me how he should treat the file, namely download it to my local drive or... (5 Replies)
Discussion started by: bionicfysh
5 Replies

9. IP Networking

Client Ip Address

I have a UNIX daemon program which takes client connections via TCP/IP sockets. What I need to know is if there is any way of getting the IP address of the client socket once a connection has been made... or do I have to code my client to send it manually ? Thanks. (1 Reply)
Discussion started by: ovingtond
1 Replies

10. UNIX for Advanced & Expert Users

Logout Apache WebServer!

I've just started an Apache WebServer a few days ago. I'm using a web site interface for uses to interact with when they login. There are only 5 accounts for my server at the moment. How would i create a logout link so that when the user wants to end their session and logout I can see this in... (1 Reply)
Discussion started by: cipher
1 Replies
Login or Register to Ask a Question
apache(1M)                                                System Administration Commands                                                apache(1M)

NAME
apache - Apache hypertext transfer protocol server overview DESCRIPTION
apache consists of a main server daemon, loadable server modules, some additional support utilities, configuration files, and documenta- tion. FILES
The apache HTTPD server is integrated with Solaris. The following files specify the installation locations for apache: /etc/apache Contains server configuration files. A newly-installed server must be manually configured before use. Typically this involves copying httpd.conf-example to the httpd.conf file and making local configuration adjustments. /usr/apache/bin Contains the httpd executable as well as other utility programs. /usr/apache/htdocs Contains the Apache manual in HTML format. This documentation is accessible by way of a link on the server test page that gets installed upon fresh installation. /usr/apache/include Contains the Apache header files, which are needed for building various optional server extensions with apxs(8) /usr/apache/jserv Contains documention for the mod_jserv java servlet module. Documention can be read with a web browser using the url: file:/usr/apache/jserv/docs/index.html /usr/apache/libexec Contains loadable modules (DSOs) supplied with the server. Any modules which are added using apxs(8)are also copied into this directory. /usr/apache/man Contains man pages for the server, utility programs, and mod_perl. Add this directory to your MANPATH to read the Apache man pages. See NOTES. /usr/apache/perl5 Contains the modules and library files used by the mod_perl extension to Apache. /var/apache/cgi-bin Default location for the CGI scripts. This can be changed by altering the httpd.conf file and restarting the server. /var/apache/htdocs Default document root. This can be changed by altering the httpd.conf file and restarting the server. /var/apache/icons Icons used by the server. This normally shouldn't need to be changed. /var/apache/logs Contains server log files. The formats, names, and locations of the files in this directory can be altered by various configuration directives in the httpd.conf file. /var/apache/proxy Directory used to cache pages if the caching feature of mod_proxy is enabled in the httpd.conf file. The location of the cache can also be changed by changing the proxy configuration in the httpd.conf file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWapchr | +-----------------------------+-----------------------------+ | |SUNWapchu | +-----------------------------+-----------------------------+ | |SUNWapchd | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) http://www.apache.org NOTES
In addition to the documentation and man pages included with Solaris, more information is available at http://www.apache.org The Apache man pages are provided with the programming modules. To view the manual pages for the Apache modules with the man command, add /usr/apache/man to the MANPATH environment variable. See man(1) for more information. Running catman(1M) on the Apache manual pages is not supported. SunOS 5.10 8 Aug 2000 apache(1M)