<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<title>Proxy configuration</title>
</head>
<body>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"> I am working on an issue with Nginx, using it as the proxy server for our internal Galaxy server. We are attempting to use the IGV module in Galaxy and when we use the option to
view BAM files in the browser we get a Java Runtime error. So far the only way around the error is to modify the URL to be
<a href="http://galaxy:8080/">http://galaxy:8080/</a>. I am able to use the other available options just fine. I have been involved in conversations with both Galaxy-Dev and IGV support. The later suggested that I mention the following:<br>
<br>
“</span></font><font size="2"><font face="Consolas, Courier New, Courier"><span style="font-size:10pt">The issue I have seen with some proxy servers is that<br>
they rewrite the request header and in the process remove a "range-byte"<br>
request header. This is critical and should not be removed.”<br>
</span></font></font><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><br>
Here is a copy of our nginx.conf file. I removed the trailing portion since it is commented out:<br>
<br>
#user nobody;<br>
worker_processes 1;<br>
<br>
#error_log logs/error.log;<br>
#error_log logs/error.log notice;<br>
#error_log logs/error.log info;<br>
error_log logs/error.log debug;<br>
<br>
#pid logs/nginx.pid;<br>
<br>
events {<br>
worker_connections 1024;<br>
}<br>
<br>
user galaxy galaxy;<br>
http {<br>
include mime.types;<br>
default_type application/octet-stream;<br>
<br>
# Added for compression and caching. According to Galaxy wiki page:<br>
# <a href="http://bitbucket.org/galaxy/galaxy-central/wiki/Config/nginxProxy">http://bitbucket.org/galaxy/galaxy-central/wiki/Config/nginxProxy</a><br>
# This will decrease downlod and page load times for clients<br>
gzip on;<br>
gzip_http_version 1.1;<br>
gzip_vary on;<br>
gzip_comp_level 4;<br>
gzip_proxied any;<br>
gzip_types text/plain text/css application/x-javascript text/xml application/xml text<br>
/javascript application/json;<br>
gzip_buffers 16 8k;<br>
gzip_disable "MSIE [1-6].(?!.*SV1)";<br>
<br>
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '<br>
# '$status $body_bytes_sent "$http_referer" '<br>
# '"$http_user_agent" "$http_x_forwarded_for"';<br>
<br>
#access_log logs/access.log main;<br>
<br>
sendfile on;<br>
#tcp_nopush on;<br>
<br>
#keepalive_timeout 0;<br>
keepalive_timeout 65;<br>
<br>
#gzip on;<br>
<br>
# Added to support proxying to galaxy server<br>
upstream galaxy_app {<br>
server localhost:8080;<br>
server localhost:8081;<br>
server localhost:8082;<br>
}<br>
<br>
server {<br>
listen 80;<br>
*** listen localhost:80; ***<br>
server_name localhost;<br>
# Line added for galaxy support<br>
client_max_body_size 10G;<br>
<br>
#charset koi8-r;<br>
<br>
#access_log logs/host.access.log main;<br>
<br>
# Added to allow nginx to handle file uploads<br>
location /_upload {<br>
upload_store /hpcdata/galaxy-setup/galaxy-dist/database/tmp/upload_store;<br>
<br>
upload_pass_form_field "";<br>
upload_set_form_field "__${upload_field_name}__is_composite" "true";<br>
upload_set_form_field "__${upload_field_name}__keys" "name path";<br>
upload_set_form_field "${upload_field_name}_name" "$upload_file_name";<br>
upload_set_form_field "${upload_field_name}_path" "$upload_tmp_path";<br>
upload_pass_args on;<br>
upload_pass /_upload_done;<br>
}<br>
location /_upload_done {<br>
set $dst /tool_runner/index;<br>
if ($args ~ nginx_redir=([^&]+)) {<br>
set $dst $1;<br>
}<br>
rewrite "" $dst;<br>
}<br>
<br>
# added to allow nginx to handle file downloads<br>
location /_x_accel_redirect/ {<br>
internal;<br>
alias /;<br>
} <br>
<br>
# The following series of "locations" are for off-loading static<br>
# content from the galaxy server.<br>
location /static {<br>
alias /hpcdata/galaxy-setup/galaxy-dist/static;<br>
# This will decrease downlod and page load times for clients<br>
expires 24h;<br>
}<br>
location /static/style {<br>
alias /hpcdata/galaxy-setup/galaxy-dist/static/june_2007_style/blue;<br>
}<br>
location /static/scripts {<br>
alias /hpcdata/galaxy-setup/galaxy-dist/static/scripts/packed;<br>
# This will decrease downlod and page load times for clients<br>
expires 24h;<br>
}<br>
location /favicon.ico {<br>
alias /hpcdata/galaxy-setup/galaxy-dist/static/favicon.ico;<br>
}<br>
location /robots.txt {<br>
alias /hpcdata/galaxy-setup/galaxy-dist/static/robots.txt;<br>
}<br>
# End of static content<br>
<br>
location / {<br>
# next two lines commented out for galaxy redirect<br>
#root html;<br>
#index index.html index.htm;<br>
proxy_pass <a href="http://galaxy_app">http://galaxy_app</a>;<br>
*** proxy_pass <a href="http://galaxy_app:8080">http://galaxy_app:8080</a>; ***<br>
proxy_read_timeout 500;<br>
proxy_next_upstream error;<br>
proxy_set_header X-Forwarded-Host $host;<br>
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
}<br>
<br>
#error_page 404 /404.html;<br>
<br>
# redirect server error pages to the static page /50x.html<br>
#<br>
error_page 500 502 503 504 /50x.html;<br>
location = /50x.html {<br>
root html;<br>
}<br>
<br>
<br>
<br>
Is there something that I am missing? Any assistance would be greatly appreciated.<br>
<br>
Regards,<br>
<br>
Iry Witham<br>
</span></font><span style="font-size:11pt"><font face="Bookman Old Style">Applications Administrator<br>
Scientific Computing Group<br>
Computational Sciences Dept.<br>
The Jackson Laboratory<br>
600 Main Street<br>
Bar Harbor, ME 04609<br>
Phone: 207-288-6744<br>
email: <a href="iry.witham@jax.org">iry.witham@jax.org</a><br>
<br>
</font><font face="Calibri, Verdana, Helvetica, Arial"><br>
<br>
<br>
<br>
<br>
</font></span>
</body>
</html>