Skip to content

Instantly share code, notes, and snippets.

@samhk222
Created September 13, 2018 12:56
Show Gist options
  • Save samhk222/015ba5a1a7ce3c0fd9c769916081d322 to your computer and use it in GitHub Desktop.
Save samhk222/015ba5a1a7ce3c0fd9c769916081d322 to your computer and use it in GitHub Desktop.
server {
listen 80 default;
client_max_body_size 108M;
access_log /var/log/nginx/application.access.log;
root /application/public;
index index.php;
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
location ~ \.php$ {
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment