Skip to content

Instantly share code, notes, and snippets.

View thedotedge's full-sized avatar

Oleg Topchiy thedotedge

  • Ukraine|Norway
  • 03:44 (UTC +02:00)
View GitHub Profile
@danackerson
danackerson / 100_base.conf
Last active October 20, 2023 10:11
using nginx + lua + redis for redirects and rewrites
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
@magnetikonline
magnetikonline / README.md
Last active December 14, 2023 06:45
Nginx FastCGI cache configuration example.

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi