Author Topic: HFS behind Nginx reverse proxy  (Read 226 times)

0 Members and 1 Guest are viewing this topic.

Offline finchy70

  • Occasional poster
  • *
  • Posts: 6
    • View Profile
HFS behind Nginx reverse proxy
« on: September 15, 2018, 07:55:49 PM »
Hi. 
I have managed to set up HFS behind a reverse proxy.but HFS seems to lose its css.  How do I set the  /domain in HFS options as I think this may be the problem.

Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 789
  • I'm only trying to help i mean no offense.
    • View Profile
    • none - google translate
Re: HFS behind Nginx reverse proxy
« Reply #1 on: September 15, 2018, 10:10:24 PM »
Did you bind hfs to a real folder.

I would first set a bind and then eidte or reuse the default template at the root in that folder(hfs.diff.tpl) before the proxy to verify file cashed and load.

Otherwise you will have to settle up IP hfs connect is on
I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline finchy70

  • Occasional poster
  • *
  • Posts: 6
    • View Profile
Re: HFS behind Nginx reverse proxy
« Reply #2 on: September 16, 2018, 07:43:21 AM »
Thanks for the reply.
Could you explain what you mean in a little more detail please.

Here is my HFS folder with tpl file.



Here is my config for HFS in Nginx.

location /hfs {
   proxy_pass http://127.0.0.1:4443/;
   proxy_set_header  X-Real-IP  $remote_addr;
   proxy_set_header        Host              $host;
   proxy_set_header        X-Forwarded-For   $proxy_add_x_forwarded_for;
   proxy_set_header        X-Forwarded-Proto $scheme;
   proxy_redirect off;
   proxy_buffering off;
}

Also how do I append /hfs to the address in the HFS settings?




Offline finchy70

  • Occasional poster
  • *
  • Posts: 6
    • View Profile
Re: HFS behind Nginx reverse proxy
« Reply #3 on: September 17, 2018, 11:08:47 AM »
Solved the issue by moving HFS to the root of Nginx proxy server.  Would like to know how to move it to the /hfs url though.

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12903
    • View Profile
Re: HFS behind Nginx reverse proxy
« Reply #4 on: September 17, 2018, 10:09:00 PM »
i guess you should rewrite the url, removing the /hfs when the request is passed to hfs.
google for it. in Apache rewrite is possible.

worst case you can move all your stuff in the hfs' virtual file system under a folder /hfs.