Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Original visitors IP X forwarded Headers

General questions about VestaCP
Post Reply
  • Print view
Advanced search
13 posts
  • Previous
  • 1
  • 2
floown
Posts: 87
Joined: Wed Nov 19, 2014 1:51 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: Original visitors IP X forwarded Headers
  • Quote

Post by floown » Wed Sep 09, 2015 12:28 pm

Hello,

I have the same problem on my Ubuntu server.

My question : where should I put : set_real_ip_from localised in /etc/nginx/nginx.con ? After witch line ?

Thx.
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: Original visitors IP X forwarded Headers
  • Quote

Post by dpeca » Tue Sep 13, 2016 8:59 pm

To see real IP in Apache logs just change in apache2.conf:
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
to
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
Top

Mavashi
Posts: 3
Joined: Sun Aug 21, 2016 1:30 am

Re: Original visitors IP X forwarded Headers
  • Quote

Post by Mavashi » Thu Mar 05, 2020 9:53 pm

dpeca wrote: ↑
Tue Sep 13, 2016 8:59 pm
To see real IP in Apache logs just change in apache2.conf:
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
to
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
Great tip. I used it long ago and it still works for VestaCP.
I added it to my post-install script to don't forget as following:

Code: Select all

sed -i 's|LogFormat "%h|LogFormat "%a|g' /etc/apache2/apache2.conf
Top


Post Reply
  • Print view

13 posts
  • Previous
  • 1
  • 2

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password