Skip to content

Instantly share code, notes, and snippets.

@johanvanhelden
Created September 16, 2018 12:37
Show Gist options
  • Save johanvanhelden/b243a0ea49819b1581feadeaeeb3bb5b to your computer and use it in GitHub Desktop.
Save johanvanhelden/b243a0ea49819b1581feadeaeeb3bb5b to your computer and use it in GitHub Desktop.
Big file uploads example vhost
server {
listen *:80;
server_name playground.big-uploads.localtest.me;
root /var/www/projects/playground/public_html/;
include conf.d/dockerhero/core/partials/logging.conf;
client_max_body_size 64m;
index index.html index.htm index.php;
include conf.d/dockerhero/core/partials/location.conf;
location ~ \.php {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME $http_host;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
fastcgi_param PHP_VALUE "max_execution_time=600";
fastcgi_param PHP_VALUE "upload_max_filesize = 64M \n post_max_size=64M";
fastcgi_ignore_client_abort on;
fastcgi_intercept_errors off;
fastcgi_pass php:9000;
}
sendfile off;
}
server {
listen *:443 ssl;
server_name playground.big-uploads.localtest.me;
root /var/www/projects/playground/public_html/;
include conf.d/dockerhero/core/partials/logging-ssl.conf;
include conf.d/dockerhero/core/partials/ssl.conf;
client_max_body_size 64m;
index index.html index.htm index.php;
include conf.d/dockerhero/core/partials/location.conf;
location ~ \.php {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME $http_host;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
fastcgi_param PHP_VALUE "max_execution_time=600";
fastcgi_param PHP_VALUE "upload_max_filesize = 64M \n post_max_size=64M";
fastcgi_ignore_client_abort on;
fastcgi_intercept_errors off;
fastcgi_pass php:9000;
}
sendfile off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment