server { listen 80 default_server; index index.php; server_name TheTempusProject; error_log /var/www/html/logs/nginx-error.log; access_log /var/www/html/logs/nginx-access.log; root /var/www/html; charset utf-8; sendfile off; client_max_body_size 100m; location /images/ { if (!-e $request_filename){ rewrite ^/images/(.*)$ /index.php?error=image404&url=$1 last; } access_log off; log_not_found off; } location /uploads/ { if (!-e $request_filename){ rewrite ^/uploads/(.*)$ /index.php?error=upload404&url=$1 last; } access_log off; log_not_found off; } location ~* \.(?:js|css|png|jpg|gif|ico)$ { access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; rewrite ^(.+)$ /images/favicon.ico break; } location = /robots.txt { allow all; access_log off; log_not_found off; rewrite ^(.+)$ /bin/robots.txt break; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_intercept_errors off; fastcgi_buffer_size 16k; fastcgi_buffers 4 16k; fastcgi_connect_timeout 60s; fastcgi_read_timeout 60s; fastcgi_send_timeout 60s; } location / { rewrite ^/errors/(.*)$ /index.php?error=$1 last; rewrite ^(.+)$ /index.php?url=$1 last; } }