user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
	worker_connections 768;
	# multi_accept on;
}

http {

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
	# server_tokens off;

	# server_names_hash_bucket_size 64;
	# server_name_in_redirect off;

	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	server {
        # love using the new stuff! -Bushy
		listen			8080 http2;
		# server_name		localhost 127.0.0.1;
		root /var/www/html;

		location ~ [^/]\.php(/|$) {
		    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
		    if (!-f $document_root$fastcgi_script_name) {
		        return 404;
		    }

		    # Mitigate https://httpoxy.org/ vulnerabilities
		    fastcgi_param HTTP_PROXY "";

		    # fastcgi_pass 127.0.0.1:9000;
		    fastcgi_pass unix:/var/run/php/php-fpm.sock;
		    fastcgi_index index.php;

		    # include the fastcgi_param setting
		    include fastcgi_params;

		    # SCRIPT_FILENAME parameter is used for PHP FPM determining
		    #  the script name. If it is not set in fastcgi_params file,
		    # i.e. /etc/nginx/fastcgi_params or in the parent contexts,
		    # please comment off following line:
		    # fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
		}

		}

	##
	# Logging Settings
	##

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

	##
	# Gzip Settings
	##

	gzip on;
	gzip_disable "msie6";

	# gzip_vary on;
	# gzip_proxied any;
	# gzip_comp_level 6;
	# gzip_buffers 16 8k;
	# gzip_http_version 1.1;
	# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

	##
	# Virtual Host Configs
	##

	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;

}
