Rewrite or proxy_pass to internal ip ?

hristoc nginx-forum at
Wed Oct 31 13:42:26 UTC 2012

Thank you,
I resolve the problem. My knowledge on nginx is little and I unable to
redirect all js, html to their locations and I did not spend much time for
that, but your answer give me idea that probably something in my
configuration making nginx to look for these files in different places ie
some logic in my config is wrong. I added new virtual host name in nginx and
proxy_pass everything to internal ip and everything is work perfect. Thank
you for your time.

Here is my configuration if some one looking for some similar. With this I
redirect web from internel hp iLO web port to external web.

# HTTPS server

server {
    listen       443 ssl;
    listen       [::]:443 ssl;

    ssl                  on;
    ssl_certificate      /etc/nginx/server.crt;
    ssl_certificate_key  /etc/nginx/server.key;
    keepalive_timeout    70;
    ssl_session_cache    shared:SSL:5m;
    ssl_session_timeout  5m;

    ssl_protocols  SSLv2 SSLv3 TLSv1;
    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers   on;
    location ~ /\.ht {
        deny  all;
    location / {
        proxy_set_header Accept-Encoding "";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_redirect off;

Posted at Nginx Forum:,232298,232421#msg-232421

More information about the nginx mailing list