I have a private ip on my network that it is a ipmi server. I have installed another server(Centos 7) and assign a public ip to use as a proxy for to be able to reach from an exernal network the ipmi server. I'm tried to do this with nginx and also with haproxy but there is something wrong on the configuration. Anyone can help me?
Here is my nginx config:
#cat /etc/nginx/conf.d/proxy.conf
upstream ipmi_backend {
# the ipmi server
server 10.150.0.34:443;
keepalive 64;
}
server {
listen 8070;
server_name ipmi.server.it;
location / {
# add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options "";
proxy_set_header X-Content-Type-Options "";
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://ipmi_backend/;
proxy_http_version 1.1;
proxy_pass_request_headers on;
proxy_set_header Connection "keep-alive";
proxy_store off;
proxy_set_header Host "ipmi.server.it:443";
}
========================================================================
Here my haproxy.cfg:
#cat haproxy.cfg
global
log 127.0.0.1 local2
pidfile /var/run/haproxy.pid
maxconn 4000
#stats socket /run/haproxy/admin.sock user haproxy group haproxy mode 660 level admin
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option http_proxy
timeout connect 50s
timeout client 50s
timeout server 50s
frontend http-in
bind localhost:8071
mode http
default_backend servers
backend servers
server server1 10.150.0.34:443 check
With nginx the error i can reach the login page, but after the credencial the page says: Your session has timed out. You will need to open a new session. With haproxy the error message is: This site can’t provide a secure connection.
Thank you.