-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-friwahl.conf
73 lines (61 loc) · 2.54 KB
/
nginx-friwahl.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
worker_processes 5; ## Default: 1
worker_rlimit_nofile 8192;
error_log /var/log/nginx/error.log debug;
events {
worker_connections 4096; ## Default: 1024
}
http {
include mime.types;
include fastcgi.conf;
index index.html index.htm index.php;
default_type application/octet-stream;
# log_format main '$remote_addr - $remote_user [$time_local] $status '
# '"$request" $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128; # this seems to be required for some vhosts
server {
listen 80 default_server;
server_name friwahl;
root /app/Web;
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
location ~ "^/_Resources/Persistent/" {
access_log off;
log_not_found off;
expires max;
rewrite "(.{40})/.+\.(.+)" /_Resources/Persistent/$1.$2 break;
rewrite "([a-z0-9]+/(.+/)?[a-f0-9]{40})/.+\.(.+)" /_Resources/Persistent/$1.$2 break;
}
location ~ "^/_Resources/" {
access_log off;
log_not_found off;
expires max;
break;
}
location / {
rewrite ".*" /index.php last;
}
try_files $uri $uri/ /index.php?$args;
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass friwahl-php:9000;
fastcgi_index index.php;
fastcgi_param FLOW_CONTEXT Development;
fastcgi_param FLOW_REWRITEURLS 1;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_intercept_errors on;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
sendfile off;
}
}