server {
	listen 80;
	server_name www.photonbarrier.com;

	location ^~ /.well-known/acme-challenge/ {
		alias /home/shenzhiming/ssl/ssl_www_photonbarrier_com/;
		try_files $uri =404;
	}

	rewrite ^(.*) https://www.photonbarrier.com;
}

server {
	listen 443 ssl;
	server_name www.photonbarrier.com;

	root /home/shenzhiming/git_projects/typecho;
	index index.php;

	ssl_certificate /home/shenzhiming/ssl/ssl_www_photonbarrier_com/chained.pem;
	ssl_certificate_key /home/shenzhiming/ssl/ssl_www_photonbarrier_com/domain.key;
	ssl_session_timeout 5m;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
	ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA;
	ssl_session_cache shared:SSL:50m;
	ssl_prefer_server_ciphers on;

	client_body_temp_path /home/shenzhiming/nginx/client_body_temp/;
	client_max_body_size 200m;

	access_log /home/shenzhiming/nginx/logs/www_photonbarrier_com/access.log main;
	error_log /home/shenzhiming/nginx/logs/www_photonbarrier_com/error.log;

	#root /home/shenzhiming/git_projects/dist;
	#index index.html;

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

	location ~ \.php$ {
		include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
		fastcgi_pass   127.0.0.1:9999;
		fastcgi_temp_path /home/shenzhiming/nginx/fastcgi_temp/;
		fastcgi_connect_timeout 1;
		fastcgi_send_timeout 300;
		fastcgi_read_timeout 300;
		try_files $uri =404;
	}

	location ~ /\.(ht|svn|git) {
		deny all;
	}
}
