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

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

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

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

	ssl_certificate /home/develop/ssl/ssl_bbs_photonbarrier_com/chained.pem;
	ssl_certificate_key /home/develop/ssl/ssl_bbs_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/develop/nginx/client_body_temp/;
	client_max_body_size 200m;

	access_log /home/develop/nginx/logs/bbs_photonbarrier_com/access.log main;
	error_log /home/develop/nginx/logs/bbs_photonbarrier_com/error.log;

	root /home/develop/git_projects/discuz/upload;
	index index.php;

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

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

#	location  / {
#		proxy_pass http://localhost:3000;
#	}

#	location /api {
#		proxy_pass http://localhost:8082;
#	}

#	location ~ .*/(css|js|img|images) {
#		root /home/develop/file/bbs-go;
#	}

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