summaryrefslogtreecommitdiff
path: root/resources/intern.gospeladlershof.conf
blob: 72654ab005a6fac94be1173f7728239fda698d3f (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
server {
	listen 80;
	listen 443 ssl http2;
        server_name 		www.intern.gospeladlershof.de;
	include			snippets/letsencrypt.conf;
	include                 /etc/nginx/conf.d/nginx_conf/ssl_conf;
	ssl_certificate         /var/lib/acme/live/www.intern.gospeladlershof.de/fullchain;
	ssl_certificate_key     /var/lib/acme/live/www.intern.gospeladlershof.de/privkey;
	include			conf.d/nginx_conf/robots.conf;

	access_log 	/var/log/nginx/gospeladlershof.de/redirect.access.log verbose;
	error_log 	/var/log/nginx/gospeladlershof.de/redirect.error.log;

	return 301 	https://intern.gospeladlershof.de$request_uri;
}

server {
	listen 80;
        server_name 		intern.gospeladlershof.de;

	location / {
		return 302 https://$server_name$request_uri;
	}

	include			snippets/letsencrypt.conf;
}

server {
	listen 443 ssl http2;
	include			snippets/letsencrypt.conf;
        server_name 		intern.gospeladlershof.de;
	root            	/var/www/gospeladlershof.de/intern.gospeladlershof.de/;
	#root            	/home/horus/sites/gospeladlershof.de/intern.gospeladlershof.de;

	access_log 		/var/log/nginx/gospeladlershof.de/intern.access.log verbose;
	error_log 		/var/log/nginx/gospeladlershof.de/intern.error.log;

	index           	index.html index.php;

	include                 /etc/nginx/conf.d/nginx_conf/ssl_conf;
	ssl_certificate         /var/lib/acme/live/intern.gospeladlershof.de/fullchain;
	ssl_certificate_key     /var/lib/acme/live/intern.gospeladlershof.de/privkey;
	include			conf.d/nginx_conf/robots.conf;

	error_page 404          /404.html;

        location ~* \.(jpe?g|png|gif|css|js|swf|txt|ico|woff2?|ttf|svg)$ {
        #        expires         365d;
                 expires         10m;
        }

        location ~* ^/favicon.ico$ {}

	location / {
		# In PHP implementiert, damit überflüssig.
		# auth_basic "Passwort verlangt - Gospelchor Adlershof";
		# auth_basic_user_file passwd/gospelchor_passwd;

		# Andere Permission!
		location ~ ^/code/deploy.php$ {
			include         snippets/fastcgi-php.conf;
			fastcgi_pass    unix:/var/run/horus-php5-fpm.sock;
		}

		location ~ \.php$ {
			include         snippets/fastcgi-php.conf;
			fastcgi_pass    unix:/var/run/php5-fpm.sock;
		}

		location = /mailman/ {
			return 302 https://$server_name/mailman/listinfo;
		}

		location = /mailman {
			return 302 https://$server_name/mailman/listinfo;
		}

		location /mailman {
			root                    /usr/lib/cgi-bin;
			fastcgi_hide_header Content-Type;
			add_header Content-Type "text/html; charset=us-ascii";
			fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
			fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
			fastcgi_param PATH_INFO $fastcgi_path_info;
			include /etc/nginx/fastcgi_params;
			fastcgi_pass  unix:/var/run/fcgiwrap.socket;
		}   

		location /mailman/private {
			root                    /usr/lib/cgi-bin;
			fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
			fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
			fastcgi_param PATH_INFO $fastcgi_path_info;
			include /etc/nginx/fastcgi_params;
			fastcgi_pass  unix:/var/run/fcgiwrap.socket;
		}

		location /mailman/public {
			root                    /usr/lib/cgi-bin;
			fastcgi_split_path_info (^/mailman/[^/]*)(.*)$;
			fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
			fastcgi_param PATH_INFO $fastcgi_path_info;
			include /etc/nginx/fastcgi_params;
			fastcgi_pass  unix:/var/run/fcgiwrap.socket;
		}

		location /images/mailman {
			alias /var/lib/mailman/icons ;
		}   

		location /icons {
			alias /usr/lib/mailman/icons;
		}   

		location /archives {
			alias /var/lib/mailman/archives/public;
			autoindex on;
		}

		location /pipermail {
			disable_symlinks off;
			alias /var/lib/mailman/archives/public;
			autoindex on;
		}
	}


	include conf.d/nginx_conf/restrict.conf;
}