login: root

welcome

Category Archives: centos

Wrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper cannot be accessed: (2)No such file or directory

If You got messed up with PHP in CentOS with plesk 10.4, You might get such error: # httpd -t Syntax error on line 65 of /var/www/vhosts/domain.tld/conf/13353493930.96968200_httpd.include: Wrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper cannot be accessed: (2)No such file or directory Small fix to make it work:

varnish+nginx as backend and real IP

With default config nginx all IP addresses shows as localhost. Here is configuration to show real client IP. Snippet from varnish config: sub vcl_pipe { set bereq.http.connection = "close"; if (req.http.X-Forwarded-For) { set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For; } else { set bereq.http.X-Forwarded-For = regsub(client.ip, ":.*", ""); } } sub vcl_pass { set bereq.http.connection = "close"; if [...]