...
Code Block | ||
---|---|---|
| ||
server { listen 443 ssl; server_name console.hostname.com; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_http_version 1.1; include /etc/nginx/ssl.conf; location /hbproxy { if ($args ~* "token=(?<token>[^&]+)&port=(?<port>\d+)") { add_header Set-Cookie "ses6=$token; Path=/;"; rewrite ^ /ipmiproxy/web/vnc/$port? redirect; } } location / { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_http_version 1.1; proxy_set_header Host $host; proxy_pass "https://dci.hostname.com/$request_uri"; proxy_buffering off; client_max_body_size 0; proxy_connect_timeout 13600s; proxy_read_timeout 13600s; proxy_send_timeout 13600s; send_timeout 13600s; } } |
Example configuration for Apache server
Code Block |
---|
<VirtualHost *:443>
SSLEngine on
SSLProxyEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
SSLProxyVerify none
SSLProxyCheckPeerCN off
Define BACKEND_HOST "dci.hostname.com"
Define BACKEND_URL "https://${BACKEND_HOST}/"
ProxyPreserveHost On
ProxyPass /hbproxy !
ProxyPass /ipmiproxy/web/vnc/ ${BACKEND_URL}/ipmiproxy/web/vnc/
ProxyPassReverse /ipmiproxy/web/vnc/ ${BACKEND_URL}/ipmiproxy/web/vnc/
ProxyPass /ipmiproxy/ws/ wss://${BACKEND_HOST}/ipmiproxy/ws/
ProxyPassReverse /ipmiproxy/ws/ wss://${BACKEND_HOST}/ipmiproxy/ws/
RewriteEngine On
RewriteCond %{QUERY_STRING} token=([^&]+)&port=(\d+)
RewriteRule ^/hbproxy /ipmiproxy/web/vnc/%2? [R,L,CO=ses6:%1:%{HTTP_HOST}]
ProxyRequests Off
ProxyTimeout 13600
Timeout 13600
</VirtualHost> |
Change console.hostname.com
to a subdomain you want to use for the console, and set https://dci.hostname.com/
to the DCIManager server address.
The last step is to configure configuring your DCIManager App in Hostbill to use the new console address.
...