This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdefault.conf
54 lines (45 loc) · 1.49 KB
/
default.conf
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
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
server_name _;
location / {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
try_files $uri $uri/ =404;
}
location ^~ /fd {
alias /usr/share/fusiondirectory/html;
index index.php;
try_files $uri $uri/ =404;
location ~ (images|include|javascript|plugins|themes)/(.+)$ {
try_files /$1/$2 =404;
}
location ~ .+[^/]\.php(/|$) {
fastcgi_split_path_info ^/fd(.+?\.php)(.*)$;
set $orig_path $fastcgi_path_info;
try_files $fastcgi_script_name =404;
fastcgi_pass unix:/run/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param PATH_INFO $orig_path;
fastcgi_param PATH_TRANSLATED $document_root$orig_path;
}
}
}