Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bellerbrock/b68c35a9c20a826c21e1c04201197bca to your computer and use it in GitHub Desktop.
Save bellerbrock/b68c35a9c20a826c21e1c04201197bca to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443 default_server;
ssl on;
ssl_certificate /etc/ssl/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/cassavabase.key;
ssl_session_timeout 100m;
ssl_protocols TLSv1.2 TLSv1.1;
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:EECDH:EDH:!MD5:!RC4:!LOW:!MEDIUM:!CAMELLIA:!ECDSA:!DES:!DSS:!3DES:!NULL;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/ssl/dhparams.pem;
server_name cassavabase.org
# auth_basic "Restricted";
# auth_basic_user_file /etc/cxgn/cxgn_password;
# generous file upload limit of 100MB
client_max_body_size 100m;
gzip on;
gzip_proxied any;
gzip_types text/javascript application/javascript application/x-javascript text/plain text/css image/png;
location /FCF1AC23BAC3E1D9EDEFEE9B010E7702.txt {
root /var/www;
break;
}
location /jbrowse {
root /export/prod/;
rewrite ^/jbrowse/?$ /jbrowse_cassavabase/JBrowse-1.11.6;
}
location ~ ^/gbrowse/bin/gbrowse/ {
rewrite ^/gbrowse/bin/gbrowse/(.*)$ /gb2/gbrowse/ ;
}
location ~ ^/gbrowse/bin/gbrowse/(.*)$ {
proxy_pass http://127.0.0.1:8081/gb2/gbrowse/$1$is_args$args;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 4m;
break;
}
location ~ ^/gb2/gbrowse/(.*)$ {
proxy_pass http://127.0.0.1:8081/gb2/gbrowse/$1$is_args$args;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 5m;
break;
}
location ~ ^/gbrowse/i/(.*)$ {
proxy_pass http://127.0.0.1:8081/gbrowse/i/$1$is_args$args;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 4m;
break;
}
location ~ ^/gb2/gbrowse_details/(.*)$ {
proxy_pass http://127.0.0.1:8081/gb2/gbrowse_details/$1$is_args$args;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 5m;
break;
}
# gbrowse static images
location ~ ^/gbrowse/bin/gbrowse_img/(.*)$ {
proxy_pass http://127.0.0.1:8081/gb2/gbrowse_img/$1$is_args$args;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 4m;
break;
}
# static gbrowse pages (includes icons etc.)
#
location ~ ^/gbrowse/(.*)$ {
proxy_pass http://127.0.0.1:8081/gbrowse/$1$is_args$args;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 5m;
break;
}
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 100m;
}
# gbrowse_syn
# ... not yet ...
}
server {
listen 80;
server_name ted.sgn.cornell.edu;
# generous file upload limit of 10MB
client_max_body_size 10m;
gzip on;
gzip_proxied any;
gzip_types text/javascript application/javascript application/x-javascript text/plain text/css;
location ~ ^/(.*)$ {
proxy_pass http://132.236.81.80/$1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 4m;
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment