/
nginx.conf
61 lines (49 loc) · 1.6 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
error_log /nginx/tmp/error.log;
pid /nginx/tmp/nginx.pid;
worker_processes 1;
events {
worker_connections 1024;
}
http {
client_body_temp_path /nginx/tmp/client_body;
fastcgi_temp_path /nginx/tmp/fastcgi_temp;
proxy_temp_path /nginx/tmp/proxy_temp;
scgi_temp_path /nginx/tmp/scgi_temp;
uwsgi_temp_path /nginx/tmp/uwsgi_temp;
sendfile off;
tcp_nopush on;
tcp_nodelay on;
# increase read timeout to avoid 504 when cloning larger repos on the "New Project" page
proxy_read_timeout 600;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
index index.html index.htm index.php;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
default_type application/octet-stream;
server {
listen 443;
ssl on;
ssl_certificate /opt/ssl/server.crt;
ssl_certificate_key /opt/ssl/server.key;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
server_name local.codescene.io;
index index.html index.htm;
root /opt/www;
access_log /nginx/tmp/access.log;
error_log /nginx/tmp/error.log;
location / {
# upstream hostname is service name in docker-compose.yml
proxy_pass http://codescene:3003;
proxy_redirect http:// $scheme://;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}