Skip to content

Instantly share code, notes, and snippets.

View ryu-blacknd's full-sized avatar

Ryuichi Sano ryu-blacknd

View GitHub Profile
@ryu-blacknd
ryu-blacknd / gist:3227063
Created August 1, 2012 13:58
Nginx+Apacheでリバースプロキシを構築する際のApacheモジュール導入例
# wget http://www.openinfo.co.uk/apache/extract_forwarded-2.0.2.tar.gz
# tar zxf extract_forwarded-2.0.2.tar.gz
# cd extract_forwarded
# apxs -i -c -a mod_extract_forwarded.c
@ryu-blacknd
ryu-blacknd / gist:3226800
Created August 1, 2012 13:19
Nginx+Apacheでリバースプロキシ構築時の設定例
# キャッシュ関連設定
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=czone:4m max_size=50m inactive=120m;
proxy_temp_path /var/tmp/nginx;
proxy_cache_key "$scheme://$host$request_uri";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;