-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx-site.conf
57 lines (44 loc) · 1.22 KB
/
nginx-site.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
55
56
57
server_tokens off;
server {
listen 80;
server_name map.openseamap.org;
root /data;
index index.php index.html;
client_max_body_size 5m;
client_body_timeout 60;
charset utf-8;
set_real_ip_from 172.17.0.1/24;
real_ip_header X-Forwarded-For;
real_ip_recursive off;
access_log /proc/self/fd/1;
error_log /proc/self/fd/2;
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
location ~ /\. {
deny all;
}
location / {
#auth_code
rewrite ^/map$ / permanent;
rewrite ^/map/(.*)$ /$1 permanent;
}
location ~ ^(.+\.php)(.*)$ {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_index index.php;
fastcgi_keep_conn on;
include fastcgi_params;
if (-f $request_filename) {
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
}
location = /_.gif {
expires max;
empty_gif;
}
}