-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.local.conf
More file actions
49 lines (41 loc) · 1.32 KB
/
Copy pathdefault.local.conf
File metadata and controls
49 lines (41 loc) · 1.32 KB
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
# nginx default website configuration
# fast_cgi to unix socket
server {
listen 80;
server_name default.local 127.0.0.1;
root /var/www/default.local;
index index.php;
# Logging --
access_log /var/log/nginx/default.local.access.log;
error_log /var/log/nginx/default.local.error.log notice;
# serve static files directly
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
access_log off;
expires max;
}
location / {
try_files $uri $uri/ @handler;
expires 30d;
}
# Works for Fuelphp
location @handler {
rewrite ^ /index.php?/$request_uri;
}
location ~ \.php$ {
try_files $uri =404;
#fastcgi_pass unix:/var/run/php5-fpm/default.local.socket; # socket
fastcgi_pass 127.0.0.1:9000; # tcp
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}