forked from diaspora/diaspora
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathnginx.conf
35 lines (28 loc) · 1.05 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
http {
gzip_static on;
log_format upstreamlog '[$time_local] $remote_addr - $remote_user - $server_name to: $upstream_addr: $request upstream_response_time $upstream_response_time msec $msec request_time $request_time';
server {
listen 80;
server_name default_server;
root /srv/public;
access_log /var/log/nginx/access.log upstreamlog;
# Proxy if requested file not found
try_files $uri @diaspora;
location @diaspora {
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 https;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://diaspora_server;
}
}
# Proxy destination
# Add as many server directives as you want
# Also takes a socket, like unix:/path/to/some/socket.sock
upstream diaspora_server {
# ip_hash;
server web:3000;
}
}
events { worker_connections 1024; }