Reverse Proxy & Log Format

Tip when you install ispconfig 3 behind a reverse proxy like nginx.

In /etc/apache2/sites-available/ispconfig.conf changes '%h' to '%{X-Real-IP}i' to get this:

Code:
LogFormat "%v %{X-Real-IP}i %l %u %t \"%r\" %>s %B \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig

In order to apache logs for awstats works properly.

I've also defined in my /etc/nginx/nginx.conf config file:

Code:
proxy_set_header   X-Real-IP        $remote_addr;

A better solution will be appreciated


( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0019412552{main}( ).../index.php:0
20.08364262520Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08364262520Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.304311372352Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.305111394064Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.306111449392Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.306511476792require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.318111876424K2ControllerItem->execute( ).../k2.php:64
90.318211876424K2ControllerItem->display( ).../BaseController.php:710
100.327512527128K2ControllerItem->display( ).../item.php:78
110.327512527128K2ControllerItem->display( ).../controller.php:19
120.331512898168Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.335512918536K2ViewItem->display( ).../ViewController.php:102
140.468815972208K2ViewItem->display( ).../view.html.php:742
150.468815972208K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.472816145144include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Rate this item
    (0 votes)
  • Published in Nginx
  • Read 1773 times
More in this category: « nginx反向代理

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0019412552{main}( ).../index.php:0
20.08364262520Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08364262520Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.304311372352Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.305111394064Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.306111449392Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.306511476792require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.318111876424K2ControllerItem->execute( ).../k2.php:64
90.318211876424K2ControllerItem->display( ).../BaseController.php:710
100.327512527128K2ControllerItem->display( ).../item.php:78
110.327512527128K2ControllerItem->display( ).../controller.php:19
120.331512898168Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.335512918536K2ViewItem->display( ).../ViewController.php:102
140.468815972208K2ViewItem->display( ).../view.html.php:742
150.468815972208K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.472816145144include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top