{"id":470,"date":"2013-10-12T21:16:01","date_gmt":"2013-10-12T21:16:01","guid":{"rendered":"https:\/\/shan.info\/new\/reverse-proxy-log-format\/"},"modified":"2013-10-12T21:16:01","modified_gmt":"2013-10-12T21:16:01","slug":"reverse-proxy-log-format","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/reverse-proxy-log-format\/","title":{"rendered":"Reverse Proxy &#038; Log Format"},"content":{"rendered":"<p><span style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">Tip when you install ispconfig 3 behind a reverse proxy like nginx.<\/span><br style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\" \/><br style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\" \/><span style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">In&nbsp;<\/span><strong style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">\/etc\/apache2\/sites-available\/ispconfig.conf<\/strong><span style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">&nbsp;changes &#8216;%h&#8217; to &#8216;%{X-Real-IP}i&#8217; to get this:<\/span><br style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\" \/><br style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\" \/><\/p>\n<div style=\"border: 0px; margin: 5px 20px 20px; padding: 0px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">\n<div class=\"smallfont\" style=\"border: 0px; margin: 0px 0px 2px; padding: 0px; font-size: 11px;\">Code:<\/div>\n<pre class=\"alt2\" style=\"background-color: #e1e4f2; margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 34px; overflow: auto;\" dir=\"ltr\">LogFormat \"%v %{X-Real-IP}i %l %u %t \"%r\" %&gt;s %B \"%{Referer}i\" \"%{User-Agent}i\"\" combined_ispconfig<\/pre>\n<\/div>\n<p><span style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">In order to apache logs for awstats works properly.<\/span><br style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\" \/><br style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\" \/><span style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">I&#8217;ve also defined in my \/etc\/nginx\/nginx.conf config file:<\/span><br style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\" \/><\/p>\n<div style=\"border: 0px; margin: 5px 20px 20px; padding: 0px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">\n<div class=\"smallfont\" style=\"border: 0px; margin: 0px 0px 2px; padding: 0px; font-size: 11px;\">Code:<\/div>\n<pre class=\"alt2\" style=\"background-color: #e1e4f2; margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 34px; overflow: auto;\" dir=\"ltr\">proxy_set_header   X-Real-IP        $remote_addr;<\/pre>\n<\/div>\n<p><span style=\"font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: normal; background-color: #f5f5ff;\">A better solution will be appreciated<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tip when you install ispconfig 3 behind a reverse proxy like nginx.In&nbsp;\/etc\/apache2\/sites-available\/ispconfig.conf&nbsp;changes &#8216;%h&#8217; to &#8216;%{X-Real-IP}i&#8217; to get this: Code: LogFormat &#8220;%v %{X-Real-IP}i %l %u %t &#8220;%r&#8221; %&gt;s %B &#8220;%{Referer}i&#8221; &#8220;%{User-Agent}i&#8221;&#8221; combined_ispconfig In order to apache logs for awstats works properly.I&#8217;ve also defined in my \/etc\/nginx\/nginx.conf config file: Code: proxy_set_header X-Real-IP $remote_addr; A better solution will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-470","post","type-post","status-publish","format-standard","hentry","category-nginx"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=470"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/470\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}