Viewing File: /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/lib/panels/ent/conf/emps/nginx.conf

#user  nobody;
worker_processes  auto;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid		/usr/local/emps/var/log/nginx/nginx.pid;

events {
	worker_connections  1024;
}


http {
	include	   mime.types;
	default_type  application/octet-stream;

	log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
					  '$status $body_bytes_sent "$http_referer" '
					  '"$http_user_agent" "$http_x_forwarded_for"';

	access_log  /usr/local/emps/var/log/web.access.log  main;

	sendfile		on;
	#tcp_nopush	 on;

	#keepalive_timeout  0;
	keepalive_timeout  65;
	server_tokens off;

	#gzip  on;
	
	###################
	# HTTP Connection
	###################
	server {
		listen	   80;
		listen	   2006;
		server_name  localhost;
		
		# The Document Root
		root	/usr/local/softaculous/enduser/ent;
		
		# Redirect server error pages to the static pages
		
		error_page              404 		@404_page;
		location @404_page {
				try_files       /nginx/custom_404.html /nginx/404.html;
		}
		
		error_page  497						@497_page;
		location @497_page {
				try_files       /nginx/custom_497.html /nginx/497.html;
		}
		
		error_page  500 502 503 504			@50x_page;
		location @50x_page {
				try_files       /nginx/custom_50x.html /nginx/50x.html;
		}

		# Pass the INDEX.PHP script to FastCGI server listening on 127.0.0.1:9178
		location ~ ^(/index.php|/)$ {
			fastcgi_read_timeout 3600;
			fastcgi_pass	127.0.0.1:9178;
			fastcgi_index	index.php;
			fastcgi_param	SCRIPT_FILENAME  $document_root$fastcgi_script_name;
			fastcgi_param	SCRIPT_NAME	  $fastcgi_script_name;
			include			fastcgi_params;
		}

		# Pass the regular PHP scripts to FastCGI server listening on 127.0.0.1:9179
		location ~ \.php$ {
			fastcgi_read_timeout 600;
			fastcgi_pass	127.0.0.1:9179;
			fastcgi_index	index.php;
			fastcgi_param	SCRIPT_FILENAME  $document_root$fastcgi_script_name;
			fastcgi_param	SCRIPT_NAME	  $fastcgi_script_name;
			include			fastcgi_params;
		}
	}

	
	###################
	# HTTPS Connection
	###################
	server {
		listen	   443 ssl;
		listen	   2007 ssl;
		server_name  localhost;

		#ssl				  		on;
		ssl_certificate			/usr/local/softaculous/conf/ent/softaculous.crt;
		ssl_certificate_key		/usr/local/softaculous/conf/ent/softaculous.key;

		ssl_session_timeout  5m;

		ssl_protocols  	TLSv1 TLSv1.1 TLSv1.2;
		ssl_ciphers  	HIGH:!aNULL:!MD5;
		ssl_prefer_server_ciphers   on;
		
		# The Document Root
		root	/usr/local/softaculous/enduser/ent;
		
		# Redirect server error pages to the static pages
		
		error_page              404 		@404_page;
		location @404_page {
				try_files       /nginx/custom_404.html /nginx/404.html;
		}
		
		error_page  497						@497_page;
		location @497_page {
				try_files       /nginx/custom_497.html /nginx/497.html;
		}
		
		error_page  500 502 503 504			@50x_page;
		location @50x_page {
				try_files       /nginx/custom_50x.html /nginx/50x.html;
		}

		# Pass the INDEX.PHP script to FastCGI server listening on 127.0.0.1:9178
		location ~ ^(/index.php|/)$ {
			fastcgi_read_timeout 3600;
			fastcgi_pass	127.0.0.1:9178;
			fastcgi_index	index.php;
			fastcgi_param	SCRIPT_FILENAME  $document_root$fastcgi_script_name;
			fastcgi_param	SCRIPT_NAME	  $fastcgi_script_name;
			include			fastcgi_params;
		}

		# Pass the regular PHP scripts to FastCGI server listening on 127.0.0.1:9179
		location ~ \.php$ {
			fastcgi_read_timeout 600;
			fastcgi_pass	127.0.0.1:9179;
			fastcgi_index	index.php;
			fastcgi_param	SCRIPT_FILENAME  $document_root$fastcgi_script_name;
			fastcgi_param	SCRIPT_NAME	  $fastcgi_script_name;
			include			fastcgi_params;
		}
	}

}
Back to Directory