-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
45 lines (37 loc) · 994 Bytes
/
nginx.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
server {
listen 80;
server_name solsearch.communityforge.net;
root /home/team/solsearch;
access_log /home/team/access.log combined;
error_log /home/team/error.log warn;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
#allow all;
log_not_found off;
access_log off;
}
# Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
deny all;
}
location ~ \..*/.*\.php$ {
return 403;
}
if ($request_uri ~* "^(.*/)index\.php$") {
return 301 $1;
}
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
fastcgi_pass php-handler;
}
location / {
try_files $uri /index.php?$query_string;
}
}