-
Notifications
You must be signed in to change notification settings - Fork 80
/
nginx_example.conf
68 lines (54 loc) · 2.24 KB
/
nginx_example.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
63
64
65
66
67
68
events {
worker_connections 1024;
}
http {
client_max_body_size 7M; # increase maximum body size from default 1M to match https://github.com/qiita-spots/qiita/blob/ac62aba5333f537c32e213855edc39c273aa9871/qiita_pet/static/vendor/js/resumable-uploader.js#L51 (which is 3M). Note that resumable-uploader.js's last chunk can be max. twice as large as chunk size, see: https://github.com/23/resumable.js/issues/51
# ports to redirect for mainqiita
upstream mainqiita {
server localhost:21174;
server localhost:21175;
server localhost:21176;
server localhost:21177;
}
# listening to 8080 and redirecting to https
server {
listen 8080;
server_name localhost;
return 301 https://$server_name$request_uri;
}
server {
listen 8383 ssl;
server_name _;
merge_slashes off;
ssl_certificate /home/runner/work/qiita/qiita/qiita_core/support_files/ci_server.crt;
ssl_certificate_key /home/runner/work/qiita/qiita/qiita_core/support_files/ci_server.key;
ssl_session_timeout 5m;
# no catche
expires off;
port_in_redirect off;
# download configuration, based on:
# https://groups.google.com/forum/#!topic/python-tornado/sgadmx8Hd_s
# protected location for working diretory
location /protected-working_dir/ {
internal;
# CHANGE ME: This should match the WORKING_DIR in your qiita
# config. E.g.,
alias /Users/username/qiita/qiita_db/support_files/test_data/working_dir/;
}
# protected location
location /protected/ {
internal;
# CHANGE ME: This should match the BASE_DATA_DIR in your qiita
# config. E.g.,
alias /Users/username/qiita/qiita_db/support_files/test_data/;
}
location / {
proxy_pass $scheme://mainqiita;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding identity;
}
}
}