Skip to content

Instantly share code, notes, and snippets.

@ronanguilloux
Created July 15, 2012 21:30
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ronanguilloux/3118699 to your computer and use it in GitHub Desktop.
Raspberry Pi Silex on Nginx
server {
listen 80; ## listen for ipv4
server_name silex;
access_log /var/log/nginx/silex.access.log;
error_log /var/log/nginx/silex.error.log;
root /var/www/silex;
location / {
root /var/www/silex;
index index.php index.html index.htm;
}
## Parse all .php file in the /var/www/silex directory
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/silex$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
## Disable viewing .htaccess & .htpassword
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment