Skip to content

Instantly share code, notes, and snippets.

@Goerik
Created July 17, 2013 06:27
Show Gist options
  • Save Goerik/6018096 to your computer and use it in GitHub Desktop.
Save Goerik/6018096 to your computer and use it in GitHub Desktop.
Nginx config proxy example
server {
listen 80;
server_name example.org www.example.org;
access_log /var/log/nginx/example.org_access.log;
error_log /var/log/nginx/example.org_error.log;
root /var/www/example.org;
index index.php;
charset utf-8;
location / {
proxy_pass http://111.222.222.111/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 10m;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment