Newer Older
40 lines | 0.905kb
initial commit
admin cloud-section (root) authored on 2016-12-10
1
server {
2
	listen         80;
3
	server_name    action.paris12.pcf.fr;
4
	return         301 https://$server_name$request_uri;
5
}
6

            
7
server {
8
	listen 443 ssl;
9
	server_name action.paris12.pcf.fr;
10

            
11
	access_log /var/log/nginx/action/access.log;
12
	error_log /var/log/nginx/action/error.log;
13

            
14
	ssl_certificate /etc/letsencrypt/live/action.paris12.pcf.fr/fullchain.pem;
15
	ssl_certificate_key /etc/letsencrypt/live/action.paris12.pcf.fr/privkey.pem;
16

            
17
	root /var/www/action;
18

            
19
	index index.php;
20

            
21
	location ~ ^/admin {
22
		auth_basic "Halte ! Qui va la ?";
23
		auth_basic_user_file /etc/nginx/htpasswd;
24
		location ~ \.php {
25
			include api_fastcgi.conf;
26
		}
27
	}
28

            
29
	location ~ /(|index.php|create_poll.php?type=.+)$ {
30
		auth_basic "Acces a la creation de sondage restreint...";
31
		auth_basic_user_file /etc/nginx/htpasswd;
32
		location ~ \.php {
33
			include api_fastcgi.conf;
34
		}
35
	}
36

            
37
	location ~ \.php {
38
		include api_fastcgi.conf;
39
	}
40
}