Skip to content

Instantly share code, notes, and snippets.

@level09
Created September 16, 2013 11:04
Show Gist options
  • Save level09/6579270 to your computer and use it in GitHub Desktop.
Save level09/6579270 to your computer and use it in GitHub Desktop.
nginx in front of apache
server {
listen 80;
index index.html;
server_name alarabiya.net www.alarabiya.net;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080;
}
location ~* ^.+.(gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
root /www/ara.net/;
access_log off;
expires 30d;
add_header X-Whom alarabiya-nginx;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment