server { listen 80 default_server; listen [::]:80 default_server; access_log off; client_max_body_size 10m; fastcgi_buffers 16 16k; fastcgi_buffer_size 16k; index index.php index.html; root /var/www/html/public; server_tokens off; set $my_https "off"; if ($http_x_forwarded_proto = "https") { set $my_https "on"; } location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $host; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS $my_https; fastcgi_param PHP_ADMIN_VALUE "sendmail_path=/usr/sbin/sendmail -i -t"; } }