forked from RITSI/ritsi_crossing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-site
49 lines (41 loc) · 1.2 KB
/
nginx-site
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
# HTTPS Server
server {
listen 80;
server_name ritsicrossing.ritsi.es;
return 301 https://ritsicrossing.ritsi.es$request_uri;
}
server {
listen 443 ssl http2;
server_name ritsicrossing.ritsi.es;
root /var/www/ritsi_crossing;
index index.php;
access_log /var/log/nginx/ritsicrossing.ritsi.es_access.log;
error_log /var/log/nginx/ritsicrossing.ritsi.es_error.log;
include /etc/nginx/snippets/letsencrypt-certificates.conf;
location ~ /\.(?!well-known).* {
deny all;
access_log off;
log_not_found off;
return 404;
}
location ~\.(sql|json) {
deny all;
access_log off;
log_not_found off;
return 404;
}
location ~*/management/index.php {
auth_basic "Management area";
auth_basic_user_file /var/www/ritsi_crossing/management/.htpasswd;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
location ~* \.php$ {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}