-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfastcgi.conf
51 lines (40 loc) · 1.68 KB
/
fastcgi.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
set $fastcgi_port "80";
if ($http_x_forwarded_proto = 'https') {
set $fastcgi_https "on";
set $fastcgi_port "443";
}
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param HTTPS $fastcgi_https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
# Setting to Port 80 and 443 based on if we have an upstream https or not
fastcgi_param SERVER_PORT $fastcgi_port;
# Setting to $host as $server_name is empty all the time
fastcgi_param SERVER_NAME $host;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
fastcgi_keep_conn on;
fastcgi_index index.php;
fastcgi_buffers 64 1m;
fastcgi_buffer_size 1m;
fastcgi_busy_buffers_size 1m;
fastcgi_read_timeout 600s;
proxy_buffer_size 1m;
proxy_buffers 4 1m;
proxy_busy_buffers_size 1m;