-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdev.conf
45 lines (36 loc) · 1.05 KB
/
dev.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
# redirect all traffic to https
server {
listen 80;
server_name testwebsite;
return 301 https://$host$request_uri;
}
upstream game-upstream {
server game:9000;
}
# main server block
server {
listen 443 ssl;
ssl_certificate /etc/nginx/conf.d/cert.pem;
ssl_certificate_key /etc/nginx/conf.d/key.pem;
client_max_body_size 0;
root /var/www/docroot;
index index.php index.html index.htm;
location ~ /data/|/css/|/js/|/favicon\.(ico|txt)|/robots\.txt|/crossdomain\.xml {
try_files $uri =404;
}
location / {
try_files $uri /index.php =404;
fastcgi_pass game-upstream;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fixes timeouts
fastcgi_read_timeout 600;
include fastcgi_params;
}
}
# enable subdomain method reverse proxy confs
include /config/nginx/proxy-confs/*.subdomain.conf;
# enable proxy cache for auth
proxy_cache_path cache/ keys_zone=auth_cache:10m;