-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx-vhost.conf
44 lines (36 loc) · 1.07 KB
/
nginx-vhost.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
map $http_x_forwarded_proto $fastcgi_param_https_variable {
default '';
https 'on';
}
# Expires map
map $sent_http_content_type $expires {
default 1M;
image/png 1M;
image/jpeg 1M;
image/jpg 1M;
}
server {
listen 0.0.0.0:80 default;
server_name _;
root /app/public;
index index.php index.html index.htm;
client_max_body_size 100m;
expires $expires;
add_header Cache-Control "public";
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass localhost:9000;
include fastcgi.conf;
fastcgi_index /index.php;
fastcgi_param HTTPS $fastcgi_param_https_variable;
fastcgi_request_buffering off;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
#fastcgi_param HTTPS on;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}