aboutsummaryrefslogtreecommitdiff
path: root/nginx.conf
blob: ac8756219f0100098dc7c75c12cad437d0295c13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
server {
	listen [::]:80;

	server_name		agenda.hebrewtools.org www.agenda.hebrewtools.org;
	
	access_log		/var/log/nginx/agenda.hebrewtools.org.access.log;
	error_log		/var/log/nginx/agenda.hebrewtools.org.error.log;
	
	return 301		https://agenda.hebrewtools.org$request_uri;
}

server {
	listen [::]:443;

	root			/var/www/agenda.hebrewtools.org;
	index			list.php;
	charset			utf-8;
	
	server_name		agenda.hebrewtools.org;
	
	access_log		/var/log/nginx/agenda.hebrewtools.org.access.log;
	error_log		/var/log/nginx/agenda.hebrewtools.org.error.log;
	
	include			/etc/nginx/confsnippets/ssl.conf;
	ssl_certificate		/etc/letsencrypt/live/agenda.hebrewtools.org/fullchain.pem;
	ssl_certificate_key	/etc/letsencrypt/live/agenda.hebrewtools.org/privkey.pem;

	location / {
		autoindex	off;
	}

	location ~ (add|fetch)\.php {
		auth_basic	"Agenda administration is only available after login:";
		auth_basic_user_file	/etc/nginx/htpasswds/agenda.hebrewtools.org;
		include		/etc/nginx/confsnippets/fastcgi.conf;
	}

	location ~ \.php$ {
		include		/etc/nginx/confsnippets/fastcgi.conf;
	}

	include /etc/nginx/confsnippets/letsencrypt.conf;

	location ~ /\. {
		deny		all;
	}

	include /etc/nginx/confsnippets/expires.conf;
}