Commit db3f076a authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner : shellinabox is now accessible from a url

based on the one of the runner
parent 2d5ad1a1
......@@ -246,6 +246,7 @@ recipe = slapos.recipe.template:jinja2
template = ${template_nginx_conf:location}/${template_nginx_conf:filename}
rendered = $${nginx-frontend:path_nginx_conf}
context =
key shellinabox_port shellinabox:port
section param_nginx_frontend nginx-frontend
section param_tempdir tempdirectory
......
......@@ -66,5 +66,17 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
}
location /shellinabox {
proxy_pass http://{{ param_nginx_frontend['global-ip'] }}:{{ shellinabox_port }}/;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment