diff options
author | Pjotr Prins | 2016-05-13 08:18:20 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-05-13 08:18:20 +0000 |
commit | 8aa1e752ac2d576a6e46610b4fe13f335682f6ba (patch) | |
tree | 8b3675a213bc7616da95332b2f2b7fdec85a82bb /doc | |
parent | 470b110cd34c1f7abeaf3e3f0b0b3d3549775ae8 (diff) | |
download | genenetwork2-8aa1e752ac2d576a6e46610b4fe13f335682f6ba.tar.gz |
README: nginx configuration as reverse proxy
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.org | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/doc/README.org b/doc/README.org index 3c1fb910..345341e1 100644 --- a/doc/README.org +++ b/doc/README.org @@ -578,11 +578,38 @@ that comes in the Guix installation. It sits in something like ** Set up nginx port forwarding -Install the webserver (as root) +nginx can be used as a reverse proxy for GN2. For example, we want to +expose GN2 on port 80 while it is running on port 5003. Essentially +the configuration looks like + +#+begin_src js + server { + listen 80; + server_name test-gn2.genenetwork.org; + access_log logs/test-gn2.access.log; + + proxy_connect_timeout 3000; + proxy_send_timeout 3000; + proxy_read_timeout 3000; + send_timeout 3000; + + location / { + proxy_set_header Host $http_host; + proxy_set_header Connection keep-alive; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $server_name; + proxy_pass http://127.0.0.1:5003; + } +} +#+end_src js + +Install the nginx webserver (as root) : guix package -i nginx -The configuration examples can be found in the Guix store through +The nginx example configuration examples can be found in the Guix +store through : ls -l /root/.guix-profile/sbin/nginx : lrwxrwxrwx 3 root guixbuild 66 Dec 31 1969 /root/.guix-profile/sbin/nginx -> /gnu/store/g0wrcl5z27rmk5b52rldzvk1bzzbnz2l-nginx-1.8.1/sbin/nginx |