server {
	listen 80;
	listen [::]:80;

	server_name default_server;
	root /var/www/html/public;
	index index.php index index.html index.htm;

	access_log /var/log/nginx/ziad.access.log;
	error_log /var/log/nginx/ziad.error.log;

	location / {
		try_files $uri $uri/ /index.php;
	}

	location ~ \.php$ {
		try_files $uri /index.php =404;
		fastcgi_pass ziad_php:9000;
		fastcgi_index index.php;
		fastcgi_buffers 16 16k;
		fastcgi_buffer_size 32k;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_read_timeout 600;
		include fastcgi_params;		
	}

	location ~ /\.ht {
		deny all;
	}

	location ~ ^/(app|vendor|tests|database|dumps|bootstrap|routes)/ {
		return 403;
	}

	location ~ /(composer|readme|license|dock.+|\.)(.+)? {
		return 403;
	}
}
