-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
62 lines (49 loc) · 1.37 KB
/
nginx.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
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
index index.html;
upstream cherry_cluster {
server localhost:8281;
server localhost:8282;
}
server {
listen 80 default_server;
server_name foobar.com; # This is just an invalid value which will never trigger on a real hostname.
#access_log logs/default.access.log main;
server_name_in_redirect off;
root /var/www/Project-EFH;
gzip on;
gzip_http_version 1.1;
gzip_disable "msie6";
gzip_vary on;
gzip_min_length 1100;
gzip_buffers 64 8k;
gzip_comp_level 3;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml;
location /scores {
proxy_pass http://localhost:8281;
break;
}
location /user {
proxy_pass http://localhost:8282;
break;
}
#static files
location ~* ^.+\.(crx|rdf|xpi|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|flv|swf|html|htm)/ {
root /var/www/Project-EFH;
}
#php via fastcgi
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
include fastcgi_params;
}
}
}