Skip to content

Instantly share code, notes, and snippets.

@tqyq
Created September 11, 2015 01:42
Show Gist options
  • Save tqyq/b967f0938afdf28616c2 to your computer and use it in GitHub Desktop.
Save tqyq/b967f0938afdf28616c2 to your computer and use it in GitHub Desktop.
nginx upload file proxy_pass to another nginx with php-fpm config
worker_processes 1;
events {
multi_accept on;
worker_connections 1024;
}
http {
client_max_body_size 30m;
client_body_buffer_size 10m;
include mime.types;
default_type application/octet-stream;
gzip on;
gzip_min_length 1000;
gzip_buffers 4 8k;
gzip_types text/plain text/css application/xml application/javascript;
ssi on;
ssi_silent_errors on;
ssi_types text/shtml;
server {
listen 80;
server_name m.keyuclass.com;
root /data/web/keyu_srv;
index index.php index.html;
location / {
try_files $uri /index.php$uri?$args;
}
location ~ .+\.php($|/) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi.conf;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment