<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>34974</bug_id>
          
          <creation_ts>2018-05-31 15:40:45 +0300</creation_ts>
          <short_desc>В логи не пишется корректный адрес прокси-сервера</short_desc>
          <delta_ts>2018-10-25 05:26:14 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>apache2</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vitaly Lipatov">lav</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>171467</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2018-05-31 15:40:45 +0300</bug_when>
    <thetext>Когда апач стоит за nginx, нужно использовать модуль remoteip:
# en2mod remoteip

вручную добавить файл с конфигом:
# cat /etc/httpd2/conf/extra-enabled/remoteip.conf 
&lt;IfModule remoteip_module&gt;
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 127.0.0.1/8
&lt;/IfModule&gt;

и всё равно не поможет, потому что 
нужно заменить %h на %a в /etc/httpd2/conf/mods-available/log_config.conf
http://terraltech.com/preserving-remote-iphost-in-apache-2-4-access-log-files-while-proxying/

вот так:
diff --git a/httpd2/conf/mods-available/log_config.conf b/httpd2/conf/mods-available/log_config.conf
index ef70e2d..2d9052a 100644
--- a/httpd2/conf/mods-available/log_config.conf
+++ b/httpd2/conf/mods-available/log_config.conf
@@ -8,12 +8,12 @@
        # The following directives define some format nicknames for use with
        # a CustomLog directive (see below).
        #
-       LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined
-       LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b&quot; common
+       LogFormat &quot;%a %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined
+       LogFormat &quot;%a %l %u %t \&quot;%r\&quot; %&gt;s %b&quot; common
 
        &lt;IfModule logio_module&gt;
                # You need to enable mod_logio.c to use %I and %O
-               LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot; %I %O&quot; combinedio
+               LogFormat &quot;%a %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot; %I %O&quot; combinedio
        &lt;/IfModule&gt;
 
Предлагаю 
а) сделать эту замену в пакете
б) приложить конфиг для remoteip</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174744</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2018-10-05 08:27:26 +0300</bug_when>
    <thetext>Давай pull request</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>175282</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2018-10-25 05:26:14 +0300</bug_when>
    <thetext>apache2-1:2.4.37-alt1 -&gt; sisyphus:

Wed Oct 24 2018 Anton Farygin &lt;rider@altlinux.ru&gt; 1:2.4.37-alt1
- 2.4.37
- removed TimeoutStartSec in httpd.service (closes: #27925)
- save to log remoteip instead of remote hostname for fix of work with
  mod_remoteip module (closes: #34974)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>