Tag: nginx
-
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…
-
Centos wordpress php-fpm + nginx + apc
If you tired of having same old apache, and want something more fast and reliable, you can install nginx + php-fpm. Firstly you need to install new repo, to have ability to add those packages. And php-fpm works out of the box (without need to patch PHP) with version PHP 5.3. Official repository does not…